0

I'm trying to get my website integrated with SagePay. Everything works well untill the payment is made. Once a client makes payment he/she gets the following error message:

Notice: Undefined index: crypt in commerce_sagepay_form_redirect_form_validate() (line 55 of /sites/all/modules/commerce_sagepay/includes/commerce_sagepay_form.inc).

Payment failed at the payment server. Please review your information and try again.

And I get the following info in the logs:

Response could not be converted to tokens

Despite these errors the payment was taken, but the order remains in the shopping cart with the status Checkout: Review

I'm using Commerce SagePay 7.x-1.0 and the integration option is Form.

1

I had a similar problem with the token conversion, be sure you're using the -dev version (2014-May-23 or later) of Commerce Sagepay before trying anything else.

Note: probably related to: https://drupal.org/node/2115203

  • 1
    Hi, thanks for your answer. It was something else - suhosin blocked the incoming data from Sagepay – drOptimum Jun 17 '14 at 14:17
0

The error which you're having:

Payment failed at the payment server. Please review your information and try again.

indicates the problem with your SagePay Server Integration. The other Notice is not related to it.

The most common reasons that the Sagepay payment could fail at this point are:

  • Network issues:

    • sagepay server can't contact your host from outside the network, so check your firewall,

    • your IP address is not on the white list in Sagepay panel, so try to add it then,

      Error Code: 4020 : Information received from an Invalid IP address
      
  • You're posting the invalid form:

    • you're e-mail is in invalid format (this especially happens when synching the db with sanitization and the e-mail looks like: foo@localhost)

      Error Code: 3078 : The CustomerEMail format is invalid.
      
    • the amount is empty or zero (e.g. when using discount/coupons)

      Error Code: 4009 : The Amount including surcharge is outside the allowed range.
      

To check with what kind of issue you're dealing with, you can:

  • In Drupal, check the Payment result message from SagePay by going to: Administration » Store » Shopping carts, and click on 'payment' for the Order which you're having problem with,
  • In Sagepay, check the logs which should be available somewhere in MySagepay panel.
  • Enable additional debugging by going to Administration » Store » Configuration » SagePay settings (e.g. Show Post (for debugging with SagePay)).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.