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

Knowing the status of the purchase after redirect #4

Open
devnix opened this issue Nov 20, 2020 · 1 comment
Open

Knowing the status of the purchase after redirect #4

devnix opened this issue Nov 20, 2020 · 1 comment

Comments

@devnix
Copy link

devnix commented Nov 20, 2020

There is another thing: when redirecting to the returnUrl/cancelUrl, the URL will contain the parameters encoded and signed. The documentation states that you should not be used to process that kind of data, but it's the only way to know if the purchase was approved, rejected, canceled, etc.

What we do to process the status and the payment is to read that data on the returnUrl, and update our transaction as "paid but unreported". After receiving the data from notifyUrl, we update it as "paid".

In order to accomplish that workflow, this function should be able to get the parameters from $_POST but also from $_GET: https://github.com/PatronBase/omnipay-redsys/blob/master/src/Message/CompletePurchaseRequest.php#L10-L13

I would love to know about your workflow if it's different and your opinion about this. Would you be interested in a PR of #2, #3, and this issue?

@devnix
Copy link
Author

devnix commented Nov 24, 2020

This would be the snippet:

public function getData()
{
    return array_merge($this->httpRequest->query->all(), $this->httpRequest->request->all());
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant