mkharibalaji / react-native-adyen-payment

React Native Adyen Payment
https://mkharibalaji.github.io/react-native-adyen-payment/
MIT License
35 stars 35 forks source link

Apple Pay doesnt work #55

Closed mickadoua closed 2 years ago

mickadoua commented 2 years ago

Hi, I try since 2 days to add apple pay to my application

Here what i did,


const computeComponentData = {
   ...
  applepay: {
    apple_pay_merchant_id: 'xxx',
  }, 
}

 return AdyenPayment.startPaymentPromise(
    paymentMethod: AdyenPayment.APPLE_PAY,
    computeComponentData(),
    computePaymentDetails({
      amount,
      shopperEmail,
      shopperReference,
    })
  );

my proxy recieve strange information

{
    "amount": {
        "value": 1500,
        "currency": "EUR"
    },
    "channel": "iOS",
    "storePaymentMethod": false,
    "reference": "xxx",
    "shopperReference": "xxx",
    "shopperEmail": "xxx@xxxx.com",
    "returnUrl": "fr.xxxx.ios.preprod:\/\/",
    "countryCode": "FR",
    "paymentMethod": {
        "applePayCardNetwork": "Visa",
        "applepay.token": "", <=== 
        "type": "applepay"
    },
    "shopperLocale": "fr_FR",
    "additionalData": {
        "allow3DS2": true,
        "executeThreeD": true
    },
    "merchantAccount": "FR_ZEturf-ZEbet"
}

on adyen v51 api's documentation, "applepay.token" variable should be "applePayToken" and of course, the value shouldnt be empty

ChielBruin commented 2 years ago

See https://github.com/Adyen/adyen-ios/issues/204 TLDR: you cannot use a simulator to test Apple Pay, you need to set up an iPhone with a Apple Sandbox account in order to test it

mickadoua commented 2 years ago

thanks @ChielBruin, i didn't check issue on adyen/ios thanks you,

ChielBruin commented 2 years ago

We should probably add this to the docs. I was stuck on this for while too

mickadoua commented 2 years ago

@ChielBruin . Yes its good idea to add this to the documentation

BTW did you follow this step from Adyen documentation to ask a certificat from adyen ? i still cant figure why i get an error from adyen Api

ChielBruin commented 2 years ago

Yes I followed those steps successfully. What error do you get?