Giter VIP home page Giter VIP logo

Comments (9)

ChielBruin avatar ChielBruin commented on September 9, 2024

Update

Using debug mode I was able to see the following things:

  • In the handle method in the APIClient, the data is received and decoded correctly (and stored in response)
  • One line below that the callback is called (completionHandler(.success(response)))
  • In the called callback function, the received data is a null-pointer
  • For obvious reasons, that breaks stuff

To be continued..

from react-native-adyen-payment.

mickadoua avatar mickadoua commented on September 9, 2024

Hi @ChielBruin,
thanks for your issue, have you succeed to make an apple payment ?

have you an exemple how you call AdyenPayment.startPaymentPromise()

from react-native-adyen-payment.

ChielBruin avatar ChielBruin commented on September 9, 2024

@mickadoua Kind of, I can make credit-card and iDEAL payments correctly and Apple Pay payments work for 99%. The dropin shows the Apple Pay popup, I can authenticate myself to confirm the payment, I get an authorized back from Adyen (and the pay ment also shows up as confirmed in the Adyen customer area), but then the app is frozen when the Apple Pay/Drop-in closes automatically.

The code I use:

const componentData =  {
    scheme: {
      card_public_key: adyenConfig.clientApiKey,
      showStorePaymentField: canStorePaymentDetails,
      showsStorePaymentMethodField: canStorePaymentDetails,
    },
    bcmc: {
      card_public_key: adyenConfig.clientApiKey,
      showStorePaymentField: canStorePaymentDetails,
      showsStorePaymentMethodField: canStorePaymentDetails,
    },
    applepay: {
          apple_pay_merchant_id: adyenConfig.applePayMerchant,
    },
};

 try {
      // Make the payment request
      const result = await AdyenPayment.startPaymentPromise(
        AdyenPayment.DROPIN,
        componentData,
        paymentDetails
      );

     // Handle result
     // ...
} catch (err) {
    // Handle any errors
    // ...
}

from react-native-adyen-payment.

ChielBruin avatar ChielBruin commented on September 9, 2024

After some debugging I've found that in the viewHierarchy there is a RCTModalHostView on top of everything. This might be related to Adyen/adyen-ios#517 I will see if I get that solution working

This is the view containing YellowBox

from react-native-adyen-payment.

ChielBruin avatar ChielBruin commented on September 9, 2024

I did some more debugging, this is what I've found:

  • What I said a couple comments back about the nullpointer is incorrect, the value is there (Reading is hard)
  • Inside the sendSuccess function in AdyenPayment.swift, the resolve callback is called with what seems to be the correct data (containing `resultcode: 'Authorized' for example), but somehow this data never reaches the javascript(typescript) code. Instead, the entire app becomes unresponsive (Although very rarely I can still interact with YellowBox warnings)

from react-native-adyen-payment.

ChielBruin avatar ChielBruin commented on September 9, 2024

I have found the issue 🎉

In AdyenPayment.swift the finish method was defined in (roughly) this way:

func finish(...) {
  ...
  self.sendSuccess(message:msg)
  currentComponent.stopLoading(withSuccess: true) {
    (...).dismiss(animated: true)
  }
}

I am unsure why this does not work for ApplePay, but by reordering the code in the following way it does work:

func finish(...) {
  ...
  currentComponent.stopLoading(withSuccess: true) {
    self.sendSuccess(message:msg)
    (...).dismiss(animated: true)
  }
}

I will open a PR for this later today

from react-native-adyen-payment.

mickadoua avatar mickadoua commented on September 9, 2024

Thanks for all your debugging information,
Unfortunately i cant make a applepay paiement,
i create an issues for my bug #55

from react-native-adyen-payment.

mickadoua avatar mickadoua commented on September 9, 2024

Hello @ChielBruin, I update the Adyen depts to from 3.6.0 to 3.8.0
with some bug related to Apple pay

3.8.0

  • Fixes small bug in ApplePayComponent to make sure call backs are invoked when its dismissed.

3.7.0

  • Adds a closure to ApplePayComponent to be called in case user cancels.
  • Fixes a bug with ApplePayComponent cancellation.

Can you try with this new version ?

from react-native-adyen-payment.

ChielBruin avatar ChielBruin commented on September 9, 2024

I am not able to test this currently, but I will do so when I am back in the office

from react-native-adyen-payment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.