-
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
Sage Pay Form integration - case mis-match for the SendEmail parameter? #139
Comments
Hi @davesmall9xb thanks for the heads up and the fix. Looking at the specs (for Sage Pay Form), the correct field name to send is The Sage Pay servers may be case-insensitive to these names, so it may not ultimately matter what case is used, but that is out of our control and so we should stick to the spec. So, I actually thinking it is this line that needs to change. And I guess we need a test too, to prove that the flag gets through to the request message. |
It looks like the same fix is also needed here: But not here: Consistency, eh? Do you fancy making that change to your fork, so it can be merged in? |
Merged - that fix works great. Thank you! I tried it out setting the I'll try to get it tagged for release in a bit. |
Now tagged for release: https://github.com/thephpleague/omnipay-sagepay/releases/tag/3.2.3 I've tried it out locally, and works fine. I will work some tests in soon, when I have a little more time, and expand those tests to cover every field that can be sent over the API. |
I'm closing this - works for me in production. |
I've come across a possible issue with the SendEmail option in Omnipay\SagePay\Message\Form\AuthorizeRequest
At https://github.com/thephpleague/omnipay-sagepay/blob/master/src/Message/Form/AuthorizeRequest.php#L127
the SendEmail data is set up, but it's then filtered out because of the mis-match in case sensitivity at https://github.com/thephpleague/omnipay-sagepay/blob/master/src/Message/Form/AuthorizeRequest.php#L29
So $data['SendEmail'] is set up properly but then filtered out because it's not in the $validFields array (the $validFields array contains SendEMail but not SendEmail).
I'd propose updating $validFields to allow 'SendEmail' rather than 'SendEMail', but I wanted to check this with the creators of this useful project :)
I have created a PR for this change at #140
The text was updated successfully, but these errors were encountered: