-
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
Issue with SagePay Forms #130
Comments
On that last section, what does Okay, the process is:
The user flow is not explained fully, I agree, so it should be read in conjunction with the description of the flow in the Sage Pay documentation. Feel free to add to the documentation if you think it will help others, once you are familiar with what it is that is missing. I hope the above helps. |
Another way to do the redirect could be a bit of PHP code like this, which will give the user a button to press to go to the Sage Pay site: echo '<form method="'.$result->getRedirectMethod().'" action="'.$result->getRedirectUrl().'" accept-charset="UTF-8">';
foreach ($result->getRedirectData() as $name => $value) {
echo '<input type="hidden" name="'.$name.'" value="'.htmlspecialchars($value).'" />';
}
echo '<p><button type="submit">Go To Sage Pay</button></p>';
echo '</form>'; The above form could |
Thanks for your response, I believe I might be having an issue with the creation of the 'crypt'. I have tried to add: $response->redirect(); But this gives me the error: How do you go about generating the crypt value? I did find the following code: $key being my encryption key but I the error is along the lines of the $response must be a string. Sorry about this, payment methods confuse me to no end! |
I have the out put of my result here, any thoughts on where I am going wrong? Thanks:
|
Have you got the purpose of steps 1 and 2 that I posted earlier? What I'm seeing here looks like they are mushed together. Only step 1 creates a redirect object. You need to focus on that first - setting up the data, then redirecting the user to Sage Pay. The Are you getting the initial redirect? |
Here, play with this, it runs the code in the documentation: |
Ah! I see what you mean. I think I was misunderstanding there. I will have a play and get back to you, cheers, had a moment of clarity now. |
Needs a diagram really. This may help just to set the picture: https://www.sagepay.co.uk/support/12/36/sage-pay-form In that diagram, |
Thanks very much :) I'll have another crack at it tonight and see what I can get working. |
…e` a little clearer.
Thanks I think I have the process clear in my head now. I am coming up with this error though:
I must not have included something correctly although I do have: At the top of my controller. Any idea what I have missed out? |
Remember |
Thanks! I have it redirecting to sagepay as expected. Now just got to get my success function working. Thanks very much for all your help :) |
No problem. Please close this issue when you are ready, and feel free to contribute to the documentation, even if it is just one line - everything helps. |
Closing as answered. |
Sorry I am unable to understand your documentation. I have setup a function with the following code:
This just results in an error about crypt:
Missing or invalid "crypt" parameter
Instead I then use the following from your documentation:
Again this gives an error relating to Crypt:
Undefined index: crypt
So then I try switching in code found in the test functions:
This then results in a blank page.
I fee the documentation is missing some vital parts to get this working. Could you provide me with a basic example function that will redirect to SagePay forms?
The text was updated successfully, but these errors were encountered: