eileenmcnaughton / nz.co.fuzion.omnipaymultiprocessor

Omnipay Multi Processor Payment Processor For CiviCRM
Other
13 stars 44 forks source link

Sagepay server error 5006 #248

Open Danultimate opened 1 year ago

Danultimate commented 1 year ago

CiviCRM 5.53 Omnipay 3.19 WordPress 6.2.2

Currently using Paypal through Omnipay with no issues but after setting Sage and testing it I get the following errors:

Server error 5006: Unable to redirect to Vendor's website. The Vendor failed to provide a RedirectionURL.

HTTP error 500: The request was unsuccessful due to an unexpected condition encountered by the server.

Transactions responses in the log look fine:

{ "VPSProtocol":"3.00","TxType":"PAYMENT","VendorTxCode":"185","VPSTxId":"{ 38F33CCD-F750-1E52-073B-9736C451FA3E}","Status":"OK","StatusDetail":"0000 : The Authorisation was Successful.","TxAuthNo":"18302688","AVSCV2":"SECURITY CODE MATCH ONLY","AddressResult":"NOTMATCHED","PostCodeResult":"NOTMATCHED","CV2Result":"MATCHED","GiftAid":"0","3DSecureStatus":"NOTCHECKED","CardType":"VISA","Last4Digits":"0006","VPSSignature":"E6632BD83BFF01A564D963BA14593B2A","DeclineCode":"00","ExpiryDate":"0226","BankAuthCode":"999777","woocommerce-login-nonce":null,"_wpnonce":null,"woocommerce-reset-password-nonce":null,"q":"civicrm/payment/ipn/185/4","civiwp":"CiviCRM","noheader":true,"IDS_request_uri":"/civicrm/payment/ipn/185/4/","IDS_user_agent":"SagePay-Notifier/1.0"}

Danultimate commented 1 year ago

According to Opayo the issue is the following:

30/06/2023 2:36:41.315 PM +0100 &sumocbchar; View as JSON {"timestamp":1688132201315,"log":{"@timestamp":1688132201314,"@version":1,"timestamp":"2023-06-30T13:36:41.314Z","level":"WARN","thread":"http-nio-8080-exec-12","mdc":{"traceId":"8aa17d94be5b55bda8fe78ab59d4c291","spanId":"a961d13c62523059","transactionId":"1DDB66B6-5BB8-D17B-DE5D-618B94D24348"},"logger":"com.sagepay.log.tracking.MDCRequestTracker","message":"There is an inconsistency in the transactionId received in the header 37F5900E-5EB4-5A10-B5E2-A93CD0FBA54B and the one in the MDC 1DDB66B6-5BB8-D17B-DE5D-618B94D24348. Resetting the MDC with the header value.","context":"default","file":"com.sagepay.log.tracking.MDCRequestTracker","method":"determineTransactionId","line":101},"stream":"stdout","time":"2023-06-30T13:36:41.315060523Z"}

As stated in the details previously sent to you;-

  1. Clear the response buffer to remove any header code, comments or HTML. Before writing the three fields above to the Response object of the POST, clear the response buffer to remove any header code, comments or HTML. Opayo's Server is expecting “Status=” to be the first character in the response.
eileenmcnaughton commented 1 year ago

@michaelmcandrew @pradpnayak I feel like you are using this? any bells

michaelmcandrew commented 1 year ago

Not us, I'm afraid.

pradpnayak commented 1 year ago

Looks like a configuration issue, have you registered the domain on the sagepay terminal?

Danultimate commented 1 year ago

Yes @pradpnayak the Full homepage URL in test sagepay match the environment Im testing from.

Danultimate commented 1 year ago

I also noticed this coming in the PHP errorlog:

[04-Jul-2023 15:21:08 Europe/London] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/bfs.co.uk/public_html/wp-content/uploads/civicrm/ext/nz.co.fuzion.omnipaymultiprocessor/vendor/symfony/http-foundation/Response.php:1238) in /home/customer/www/bfs.co.uk/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on

Any ideas @eileenmcnaughton @pradpnayak