Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swish missing return parameter redirectResult #19

Open
rvdsteege opened this issue Nov 24, 2022 · 5 comments
Open

Swish missing return parameter redirectResult #19

rvdsteege opened this issue Nov 24, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@rvdsteege
Copy link
Member

From customer:

Hi. How can I get more information on the error some of our customers is given on the redirect (back to us) after completed payment? Neither Adyen or Pronamic Pay shows any problem with the payment.
Payment method Swish.
{"code":"rest_missing_callback_param","message":"En eller flera parametrar saknas: redirectResult","data":{"status":400,"params":["redirectResult"]}}

/wp-json/pronamic-pay/adyen/v1/return/[Payment ID]?sessionId= …

Internal Help Scout ticket: https://secure.helpscout.net/conversation/2070739526/24807

@rvdsteege rvdsteege added the bug Something isn't working label Nov 24, 2022
@rvdsteege
Copy link
Member Author

rvdsteege commented Nov 24, 2022

Adyen support ticket 3444546.

Reüel
November 17, 2022 15:48

Hello,

We've received notice from a user (⏺⏺⏺⏺⏺⏺⏺⏺⏺⏺.se) of our Pronamic Pay plugin for WordPress that there's an issue when using the Swish payment method.

Payments are created and processed correctly. However, an error message appears when the customer is redirected back to the website after payment. The error message about a missing parameter is from our implementation, because we always expect a redirectResult parameter in the URL on return, but the parameter isn't there (anymore?).

Is it correct that there is no redirectResult parameter when returning back to the site after a Swish payment? Should we handle this parameter as 'optional' instead of 'required'? Thank you in advance for your reply.

Best regards,

Reüel van der Steege
Pronamic

@rvdsteege
Copy link
Member Author

Reüel
November 17, 2022 16:05

Hello again,

As a side note, I seem to be unable to start Swish test payments, even though we were able to do this in the past. All test payments through drop-in result in an acquirer error: "No response from ACM" (e.g. PSP reference GMK9QZV49QHG5S82). Is there anything we can do different to resolve this or are there known issues with testing Swish payments?

For completeness, the redirect result in my original message is referring to https://docs.adyen.com/online-payments/web-drop-in#handle-redirect-result :-)

Best regards,

Reüel van der Steege
Pronamic

@rvdsteege
Copy link
Member Author

rvdsteege commented Nov 24, 2022

Jonathan
November 22, 2022 at 19:39

Hi Olamide,

Thanks for reaching out.

This is a known issue with Swish at the moment. We are working hard to have it resolved.

In the meantime they are recommending that this workaround be implemented if you would like to receive a synchronous response rather than relying on the webhook notification.

You would have to implement an onAdditionalDetails event to pass the state.data to the /payments/details endpoint:

onAdditionalDetails: (state, component) => { 
	submitDetails(state.data).then((response) => {      // pseudo function to make a /payments/details call
		if (response.action) {
			component.handleAction(response.action);
		} else if (response.resultCode === "Authorised") {
			component.setStatus("success", { message: "Payment successful!" });
			setTimeout(function () { component.setStatus("ready");
			}, 2000); 
		} else if (response.resultCode !== "Authorised") {
			component.setStatus("error", { message: "Oops, try again please!" }); 
		}
	}) .catch((error) => { throw Error(error);
	});
}

If you are performing a redirect you can make a /payments call store the paymentData from the response and make a /payments/details call when the shopper returns:

{
    "paymentData": "{{paymentData}}"
}

or

{
    "paymentData": "{{paymentData}}",
    "details": {
    },
}

Let us know if you have any questions.

Kind regards,
Jonathan Delaney
Technical Support Engineer
Adyen

@rvdsteege
Copy link
Member Author

Reüel
November 28, 2022 at 14:29

Thank you for your reply, Jonathan.

For now, we will handle the redirectResult parameter as optional on our side. A 'pending payment' message will then be shown to the customer, instead of the actual final payment status (if the payment status was not already updated by a webhook before returning to the website).

This is a known issue with Swish at the moment. We are working hard to have it resolved.

That would be great and in line with the documented parameters at https://docs.adyen.com/online-payments/web-drop-in#handle-redirect-result

What ETA can we communicate to (y)our customer for this to be resolved?

Best regards,

Reüel van der Steege
Pronamic

@rvdsteege
Copy link
Member Author

Jonathan
November 28, 2022 at 15:51

Hi Reüel,

That is a suitable alternative.

It is quite a major fix and the release of a new minor version that is required. We have no ETA yet for its release.

We will let you know as soon as the release of this fix has been planned.

Apologies for any disruption to service caused.

Kind regards,
Jonathan Delaney
Technical Support Engineer
Adyen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: External
Development

No branches or pull requests

1 participant