Open multikitty opened 1 year ago
Hello there, @multikitty thanks for reporting.
The usage of v0.2 API may not be the issue with the failed payments. This version has been used since 2020 :)
Here is a working example of an app for reference: https://github.com/cristianoliveira/nextjs-sumup-payments-starter
And here is where the SDK is used: https://github.com/cristianoliveira/nextjs-sumup-payments-starter/blob/main/components/PaymentWidget.tsx#L18
Thanks for your response.
onResponse: function (type: string, body: { status: string }) {
if (type === 'success' && body.status === 'PAID') {
onSuccess({ message: 'Thanks! 🎉' });
}
if (type === 'success' && body.status === 'FAILED') {
onError({
message:
'Something went wrong with the payment. Check your info and try again.',
});
}
if (type === 'fail') {
onError({
message:
'Something went wrong with our system. See console logs for details.',
});
}
console.log('Type', type);
console.log('Body', body);
},
In my case, the response -> (type === 'success' && body.status === 'FAILED') (almost always) Payload information are always same, but sometimes body.status === 'PAID' and almost body.status === 'FAILED'. Could you tell me about this reason? Regards
I created checkout page using Payment Widget sdk like the following:
When I click the submit button, the request is sent to https://api.sumup.com/v0.2/checkouts/:id
Transactions almost always fail. Most transactions fail. I wonder if v0.2 is the reason.
So I tried to process checkouts via REST API v0.2 instead of v0.1.
The result is same as sdk. But the transactions always succeed via v0.1.
Who can let me know the url of sumup-card widget sdk file using v0.1 if it exist?