zeddz92 / react-native-paypal

Wrapper for native paypal sdk
11 stars 12 forks source link

Payment Failed: System Error. Please try again later. #16

Closed mitesh-db closed 4 years ago

mitesh-db commented 4 years ago

Any idea why my payment is getting failed when I do "Pay With Card"? getting the following log...

E/paypal.sdk: request failure with http statusCode:500,exception: E/paypal.sdk: request failed with server response:{"name":"INTERNAL_SERVICE_ERROR","message":"An internal service error occurred.","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"5277169121212"} E/paypal.sdk: INTERNAL_SERVICE_ERROR

Here is the code:

RNPaypal.paymentRequest({
      clientId:
        '---my-client-id---',
      environment: RNPaypal.ENVIRONMENT.SANDBOX,
      intent: RNPaypal.INTENT.SALE,
      price: 90,
      currency: 'USD',
      description: `Deep V-Neck Long Black Prom Dress`,
      acceptCreditCards: true,
    })
      .then(response => {
        console.log(response);
      })
      .catch(err => {
        console.log(err.message);
      });
mitesh-db commented 4 years ago

Also on simulator it shows an Alert saying following with no other logs in XCode: We're Sorry - Server not responding. please try again later.

mitesh-db commented 4 years ago

Error resolved!!!

I was using live credentials in Sandbox environment so I faced the error.