codeboxrcodehub / flutter-bkash

Flutter/dart package for payment gateway bKash (Bangladesh)
https://pub.dev/packages/flutter_bkash
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

No payment window popups when isSandbox is set to false. #3

Closed Ahnaf16 closed 1 year ago

Ahnaf16 commented 1 year ago

This is where I'm stuck. Nothing is happening after this. image This is my code. (copy pasted from the repo)

BkashPayment(
      isSandbox: false,
      amount: '20',
      intent: 'sale',
      // accessToken: '',
      currency: 'BDT',
      createBKashUrl:
          'https://tokenized.pay.bka.sh/v1.2.0-beta/tokenized/checkout/create',
      executeBKashUrl:
          'https://tokenized.pay.bka.sh/v1.2.0-beta/tokenized/checkout/execute',
      scriptUrl: 'https://scripts.pay.bka.sh/versions/1.2.0-beta/checkout/bKash-checkout.js',
      paymentStatus: (status, data) {
        log('return status => $status');
        log('return data => $data');
      {...}
    );
rdnasim commented 1 year ago

Hello Brother,

If you need to set isSandbox as 'false', then ensure to keep custom createBKashUrl and executeBKashUrl. Which means you are on the production environment.

Thanks

Ahnaf16 commented 1 year ago

Hello Brother,

If you need to set isSandbox as 'false', then ensure to keep custom createBKashUrl and executeBKashUrl. Which means you are on the production environment.

Thanks

I don't think I got that, but did you mean tokenized url won't work? Instead I need to use merchants payment url?

ratulhasanruhan commented 1 year ago

I have the same issue. I create a custom backend but it's same

Ahnaf16 commented 1 year ago

Hello Brother,

If you need to set isSandbox as 'false', then ensure to keep custom createBKashUrl and executeBKashUrl. Which means you are on the production environment.

Thanks

@rdnasim So do I need to create a custom API on my backend that will handle the payment creation and execution? Do I need a custom Script also?

rdnasim commented 1 year ago

Sorry for this trouble. Bkash changed there payment process. Need to update this package. I have not enough time to update this. But it will update inshaAllah.

I suggest to you, please follow bkash documentation. It will be more helpful.