Closed RyanLinXiang closed 1 month ago
Note that the boolean that you provide to the hide
function indicates whether an error occurred, not whether the component should be hidden.
As far as I know, the .handle
function takes a value as argument that you get from the callback function. So it could well be that it crashes when you don't provide any arguments.
I recommend taking a look at the example app in this repository on how to implement all the callbacks and server requests (https://github.com/Adyen/adyen-react-native/blob/develop/example/src/Views/Checkout/AdvancedCheckout.js)
@ChielBruin of course I pass parameters to .handle() - I just put it as example in my original post. But I already resolved by following this solution(https://github.com/Adyen/adyen-react-native/issues/163).
Regarding AdyenAction.hide => here I don't get your point. Why does this method not close the drop in ? I call this method, but it does not do anything.
Hey @RyanLinXiang
But I already resolved
Were you missing a MaterialComponents
in styles.xml
?
AdyenAction.hide(true) does not close the drop-in
AdyenAction
module is unrelated to a Drop-in (aka "list of available payment methods").
If you need to dismiss the Drop-in/Component UI - call nativeComponent.hide(xxx)
in AdyenAction
callbacks.
Does AdyenAction need to be embedded inside the component?
No, it doesn't need to.
AdyenAction.handle(...)
returns promise
that needs to be awaited.
See example code for storedPayment.
Describe the bug AdyenAction.hide(true) does not close the drop-in AdyenAction.handle() crashes the app:
I have one general question since AdyenAction standalone is so poorly documented: Does AdyenAction need to be embedded inside the component?
Thanks & BR