react-native-payments icon indicating copy to clipboard operation
react-native-payments copied to clipboard

Apple Pay paymentRequest.show() doesn't resolve

Open raulgordejev opened this issue 2 years ago • 3 comments

I'm following the official demo, but both on real device and emulator I'm getting stuck in the 'Processing' state. Also paymentRequest.show() promise never resolves. Any ideas what might be wrong here?

    const DETAILS = {
      id: 'basic-example',
      displayItems: [
	  {
		  label: 'Movie Ticket',
		  amount: { currency: 'USD', value: '15.00' },
	  },
      ],
      total: {
	  label: 'Freeman Industries',
	  amount: { currency: 'USD', value: '15.00' },
      },
    };

    const METHOD_DATA = [
      {
	      supportedMethods: ['apple-pay'],
	      data: {
		      merchantIdentifier: '***,
		      supportedNetworks: ['visa', 'mastercard'],
		      countryCode: 'EE',
		      currencyCode: 'EUR',
	      },
      },
     ];

    const paymentRequest = new PaymentRequest(METHOD_DATA, DETAILS);

    paymentRequest
	    .show()
	    .then((paymentResponse) => {
		    // Never gets here

		    paymentResponse.complete('success');
	    })
	    .catch((error) => {});
Screenshot 2022-09-28 at 15 38 06 Screenshot 2022-09-28 at 15 38 29

raulgordejev avatar Sep 28 '22 12:09 raulgordejev

Hey @raulgordejev Did you manage to get it running?

filippobarcellos avatar Oct 05 '22 13:10 filippobarcellos

@filippobarcellos unfortunately not. I ended up using another library react-native-apple-payment

raulgordejev avatar Oct 06 '22 12:10 raulgordejev

still not resolved? having the same problem

dentep avatar Jan 18 '23 21:01 dentep