Bkash Payment Gateway

Reference

API Reference

Only setOrder and setCustomer are required. Everything else is optional.

Example

Minimal example:

ts
$response = Bkash::setOrder($amount, $invoiceId, 'Wireless Headphones', 'Electronics')
    ->setCustomer(
        $user->name,
        $user->email,
        '01700000000',
        '123 Mirpur Road', 'Dhaka', 'Dhaka', '1216'
    )
    ->setShippingInfo(2, '456 Gulshan Ave', $user->name, 'Dhaka')
    ->setGateways(['visa', 'mastercard', 'bkash'])
    ->setProductProfile('physical-goods')
    ->makePayment([
        'value_a' => $order->id,      // passes through to Bkash
        'value_b' => 'customer_ref_' . $user->id,
    ]);

Optional chainable methods:

MethodDescription
setCallbackUrls($success, $failure, $cancel, $ipn)Set callback URLs for success, failure, cancel, and IPN.
setGateways(array $gateways)Restrict to specific gateways, e.g. ['visa', 'mastercard', 'bkash'].
setProductProfile(string $profile)Restrict to specific type of product profile, e.g. 'physical-goods'.