0

zarinpal request not working in my app.

I implemented the code as zarinpal documentation, but it does not work.

PaymentRequest payment = ZarinPal.getPaymentRequest();


            payment.setMerchantID("71c705f8-bd37-11e6-aa0c-000c295eb8fc");
            payment.setAmount(100);
            payment.setDescription("In App Purchase Test SDK");
            payment.setCallbackURL("app://app");
            payment.setMobile("09355106005");
            payment.setEmail("imannamix@gmail.com");


            ZarinPal.getPurchase(getApplicationContext()).startPayment(payment, new OnCallbackRequestPaymentListener() {
                @Override
                public void onCallbackResultPaymentRequest(int status, String authority, Uri paymentGatewayUri, Intent intent) {

                    startActivity(intent);
                }
            });
Mostafa Azadi
  • 2,893
  • 2
  • 12
  • 19

1 Answers1

3

zarinpal work by volley library in android . volley library version 1.1.0 not working in android 9. then you must update volley library version to 1.1.1

replace

implementation 'com.zarinpal:purchase:0.0.8-beta

to

implementation ('com.zarinpal:purchase:0.0.8-beta'){ exclude group: 'com.mcxiaoke.volley', module: 'library' }
implementation 'com.android.volley:volley:1.1.1'
Mostafa Azadi
  • 2,893
  • 2
  • 12
  • 19