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

Second CardType does not contain tamper: true #39

Open
Patabugen opened this issue May 13, 2017 · 1 comment
Open

Second CardType does not contain tamper: true #39

Patabugen opened this issue May 13, 2017 · 1 comment

Comments

@Patabugen
Copy link
Contributor

I've been debugging SagePay callback errors which were giving me the error Undefined index: CardType in Academe/SagePay/Server.php on line 247

I believe this is caused by the duplicated CardType in Metadata/Transaction.php (noted in comment on line 23) because the second CardType does not contain the "tamper": true, field (the first one does).

Since the key is duplicated, the first one is ignored - I'd suggest we merge the two card type lists and consider how we might separate them again in future if we need to have different data types per source (the validation will be slightly less strict, but at the moment I'm not sure how or why it would even be working for server-notification - the first one.

@Patabugen
Copy link
Contributor Author

ExpiryDate has the same issue - it's listed twice but the second time doesn't have 'Tamper' set.

I'm happy to make a pull request if people think my fix sounds correct - I don't want to just guess/assume.

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