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

Update AuthorizeRequest.php #140

Merged
merged 2 commits into from
Aug 19, 2019
Merged

Conversation

davesmall9xb
Copy link
Contributor

@davesmall9xb davesmall9xb commented Aug 8, 2019

I've come across an 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
$data['SendEmail'] is set up, but this is filtered out by a mismatch in case sensitivity
at https://github.com/thephpleague/omnipay-sagepay/blob/master/src/Message/Form/AuthorizeRequest.php#L29

The same appears to be true for $data['VendorEmail'], which is set up at https://github.com/thephpleague/omnipay-sagepay/blob/master/src/Message/Form/AuthorizeRequest.php#L103 but then filtered out by the mismatch in case sensitivity at https://github.com/thephpleague/omnipay-sagepay/blob/master/src/Message/Form/AuthorizeRequest.php#L28

It seems like the correct data should be SendEMail and VendorEMail, so I'm proposing a change in the lines that set up the $data array.

I've come across an 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 :)
Fix inversed so that SendEMail and VendorEMail data is passed to Sage Pay (NB this is case sensitive) rather than being filtered out by $validFields
@judgej judgej merged commit af116fd into thephpleague:master Aug 19, 2019
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

Successfully merging this pull request may close these issues.

2 participants