Skip to content
View 01967974760's full-sized avatar
  • 10
  • 05:58 (UTC -12:00)

Block or report 01967974760

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
01967974760/README.md

const axios = require('axios');

const BKASH_API_URL = 'https://api.bkash.com/v1.2.0/payment/request'; const CLIENT_ID = 'your_client_id'; const CLIENT_SECRET = 'your_client_secret';

// Request to generate a token async function getAuthToken() { try { const response = await axios.post('https://api.bkash.com/v1.2.0/oauth/token', { client_id: CLIENT_ID, client_secret: CLIENT_SECRET, grant_type: 'client_credentials', }); return response.data.access_token; } catch (error) { console.error('Error fetching auth token:', error); } }

// Payment request async function createPayment(amount, phoneNumber) { const token = await getAuthToken();

try { const paymentResponse = await axios.post(BKASH_API_URL, { amount: amount, phone_number: phoneNumber, // other payment details }, { headers: { 'Authorization': Bearer ${token}, 'Content-Type': 'application/json', }, });

console.log('Payment successful:', paymentResponse.data);

} catch (error) { console.error('Error making payment:', error); } }

createPayment(100, '01701499509');

Popular repositories Loading

  1. 01967974760 01967974760 Public

    Config files for my GitHub profile.

    1

  2. Jack Jack Public

  3. gibberlink gibberlink Public

    Forked from PennyroyalTea/gibberlink

    Two conversational AI agents switching from English to sound-level protocol after confirming they are both AI agents

    TypeScript

  4. production-stack production-stack Public

    Forked from vllm-project/production-stack

    Scale from single vLLM instance to distributed vLLM deployment without changing any application code.

    Python

  5. Jack666 Jack666 Public