Closed daviddamilola closed 5 months ago
Hey @daviddamilola
The payment sheet also closes.
On iOS payment sheet or SFSafariViewController does not (usually) dismiss itself 🤔
If I understand it correctly, what we see on this video is following:
1) You send /payments
request
2) You receive action
from Adyen API and pass it to SDK to handle
3) PayPal (or any other PM) appear, detects fraud (or whatever reason for denial) and call returnURL
with "refused" status
4) You receive onAdditionalDetails
callback and call component.hide(false)
that dismiss
Is above correct?
Hey @daviddamilola
The payment sheet also closes.
On iOS payment sheet or SFSafariViewController does not (usually) dismiss itself 🤔
If I understand it correctly, what we see on this video is following:
- You send
/payments
request- You receive
action
from Adyen API and pass it to SDK to handle- PayPal (or any other PM) appear, detects fraud (or whatever reason for denial) and call
returnURL
with "refused" status- You receive
onAdditionalDetails
callback and callcomponent.hide(false)
that dismissIs above correct?
Hi @descorp , thanks for your response, step 3
is incorrect, there is no refused status in the response
{"action": {"method": "GET", "paymentMethodType": "paypal", "type": "redirect", "url": "https://test.adyen.com/hpp/checkout.shtml?u=redirectPayPal&p=eJztW993m7gS-mvsFx9xQAgQDzwkttNkmzZp7Cb1vuQIScQ0GCjISb1--R3Axr9jsufu9l5OkxwSa0aj*UZCM58CLIqSV3Mwwp7K5rLL0jQKOVNhEl-FQaJFoZ*xbPGZzaTHxELGKE6ERCwN0VJ0rMu9zHJo8gxTMzSzC22x6ENfL2WLlEVdPs4YlynLZKw8XUcGsaW0He5jVxiBK4jgjmP5riMMSkzCUGC7gUGprXMLOxaXSDe6fCr5czJXmvpvGEvmscoWpZODYZfPMzDHq8-Dr3fdKIzllZKz3OtY5x3nvINxKODSMc-gSil1LOIIxAT1EaE2QdSUFFm6E5jMIfDNC2XchytPoiRbd3W3BQOZ8yxMi4jWOucR48*1WgzzUYvu5NM8Ylmvz7KnpHfLYtUrtXtZGOdS1J3SLBFzrq7WPhsAP3AEQa7LbfCZB8iV3EC*ZZo2*AW-3N3uH*Wi7n*lGxagfqTuo453FUfR-KnWzCofES98RCn4iPzCR1T5iKixHujHHMShWg5jVI05n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FOewkZTobwjZUbF51p3Lciu3Uvq7Pyvb8qXnIyucTus5gNdC4IA64m8MuWb3cOfe1F6w9XOC*9Yf9rX85oB8dirUxyS1T3I6N9OvL-Dq9N78t*j9*freZuB9djqJ0OBimo3h4markP0jk9Nw"}, "resultCode": "RedirectShopper"}
the result code is "resultCode": "RedirectShopper"
our onAdditionalDetails is
const onAdditionalDetails = async (
data: PaymentMethodData,
nativeComponent: AdyenActionComponent,
) => {
getPaymentDetails(data, {
onSuccess: result => {
if (result.action) {
nativeComponent.handle(result.action);
} else {
processResult(result, nativeComponent, {
onSuccess: successHandler,
});
}
},
onError: () => {
nativeComponent.hide(false);
setFieldValue('error', 'Your payment method failed');
},
});
};
Hey @daviddamilola
But step 4 does occur, right?
Meaning you receive onAdditionalDetails
callback ?
Hey @daviddamilola
But step 4 does occur, right? Meaning you receive
onAdditionalDetails
callback ?
yes @descorp
Good :)
step 3 is incorrect, there is no refused status in the response
This is why you do not get onError
- the IP check happens on PayPal side. Adyen can only find about the outcome/reason after you submit PaymentMethodData
to \payment\details
API.
In your processResult
function you should be able to check what does result
contains: resultCode
, refusalReason
etc
Good :)
step 3 is incorrect, there is no refused status in the response
This is why you do not get
onError
- the IP check happens on PayPal side. Adyen can only find about the outcome/reason after you submitPaymentMethodData
to\payment\details
API.In
processResult
you can check what doesresult
contains:resultCode
,refusalReason
etc
Ah, this makes sense. Thank you very much, i can see the result in the \payment\details
call : ).
Describe the bug I am using the
AdyenCheckout
component, when paypal payment method is used, and adyen flags a payment as fraud based on the ip, the onError call back is never reached. The payment sheet also closes.FYI for klarna and card payment methods, a refusalReason is sent but it is not the case for paypal
To Reproduce Steps to reproduce the behavior:
onError
to adyen checkout and other required config.Screenshots
https://github.com/Adyen/adyen-react-native/assets/44063913/1bc6ab74-3961-442d-8493-ac2086d10ee0
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context the only response gotten from adyen is with a resultCode of
RedirectShopper
, if the connection is refused, as it indicates on adyen dashboard, the result code should at least be different