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

Handle sagepay security key (update acceptNotification() type payment for omnipay 3.0) #82

Closed
wants to merge 1 commit into from

Conversation

mattwire
Copy link
Contributor

  • acceptNotification() no longer uses the send() method.
  • We need to save the transaction reference before redirecting as it's used (in sagepay) to store the security key for the transaction.
  • On handling the IPN we either have to set the security key or transaction reference (per omnipay docs) to validate the IPN.

@civibot civibot bot added the master label Feb 25, 2019
$response = $this->gateway->acceptNotification($params);

$transactionId = $response->getTransactionId();
$transactionReference = civicrm_api3('Contribution', 'getvalue', ['id' => $transactionId, 'return' => 'trxn_id']);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think getvalue will return errors where empty - I think here & above it would be safer with some empty handling for other gateways

@elcapo elcapo mentioned this pull request Jan 27, 2020
@mattwire
Copy link
Contributor Author

Closing in favour of #147

@mattwire mattwire closed this Jan 27, 2020
@mattwire mattwire deleted the securitykey branch December 22, 2020 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants