-
Notifications
You must be signed in to change notification settings - Fork 78
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
Form Authorize #146
Comments
I've been away for a few days, and only just seen this. I'll hopefully take a look through the details later today. |
Okay, quick look, and you may have missed a simple step out. You do this:
And you say you get a request. That is correct. This is what you are really doing:
Subtle, I know :-) Now what do you do with the request that Omnipay gives you? You "send" it. That's what you do with all Omnipay requests, no matter what the driver, or what you expect to happen next.
What you get back is an Omnipay
That's a kludgy and messy way to redirect, but it is great while developing just to see it all working. You should build your own redirect from the details:
The |
That inherited code is probably mostly not needed. It looks like it takes the url/method/data supplied by the server, adds a few more parameters, then POSTs it. I'm not sure why it does that. Everything you need to POST should be in the original generated url/method/data. I suspect I may be overlooking something there though. In the end, Omnipay gives you a url, a method, and data, and you decide how to redirect the user's browser. That may be via a JavaScript POST, or could even be a form with hidden items and a single |
hello i using the code stated here to get a response to redirect to sagepage payment page but on the payment page there is a sentence How do you want to pay? but there is no payment method and just a cancel button! can you tell me what am i doing wrong? and by the way i noticed that the TxType is set to 'deferred' how can i change it to 'payment'? |
@alireza2281 could you raise this on a new issue please. It's easier to keep each support request separate. In the meantime, if you don't see any payment methods, then you will need to check you have payment methods set up in your Sage Pay account. The page should look something like this: Closing this original issue. I'm assuming OP either fixed their problem or it is no longer relevant. |
@alireza2281 have you found fix how to change deferred to payment maybe? |
@adriandmitroca i can't remember how exactly i fix it and unfortunately i don't have access to that code. but i remember something that i changed it, the way that the document said. |
I'm having issues implementing the Form method.
Under Form Authorize, the documentation here: https://github.com/thephpleague/omnipay-sagepay#sage-pay-form-methods says:
The $response will be a POST redirect, which will take the user to the gateway. At the gateway, the user will authenticate or authorise their credit card, perform any 3D Secure actions that may be requested, then will return to the merchant site.
I can see when I'm debugging the application that the $response is an AuthorizeRequest object. I have to build the post redirect form myself and submit it, and it takes me to https://test.sagepay.com/gateway/service/vspform-register.vsp with the error
Status Detail: | 5080 : Form transaction registration failed.
This is my complete test code, for reference:
This code above is running on a microservice which is separate from the main site. I then return the $payment_url to the main site where the url is parsed and relevant parameters are extracted from it, then placed into a form and the form gets submitted:
This last chunk of code is part of the main site which I inherited from another developer so I'm trying to roll with what was already there. The main site was already processing payments via sagepay, only we lost access to the microservice which returned the $payment_url so all we need to do at this point is fix the first chunk of code running on the microservice so that it returns a url, and then the rest of the site should continue to work.
To recap, the issue I'm having is a Status Detail: | 5080 : Form transaction registration failed. error once we redirect, and that has left me stuck.
PS - the previous microservice was able to generate that url without the $card object being submitted. Is that still possible?
Thank you!
JDJ: Edited for formatting only.
The text was updated successfully, but these errors were encountered: