Sagepay Plugin 1.6 for nopCommerce 2.80 VOID error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
Hi,

I've been trying to get version 1.6 of this plugin working for nopCommerce 2.80. I came across an installation issue, which I found a solution for previously . However I'm running transactions through the Sagepay test server and am able to successfully transact deferred/authorised payments. However in the nopCommerce admin panel for any of these orders, I can generate DEFERRED and AUTHORIZED payments with no problems, but some processing actions cause errors. Here are the actions and responses I am getting:

---
Capture method: DEFERRED
Payment status: AUTHORIZED
Order status: PENDING
Action: VOID
Result: Error (INVALID: The VendorTxCode you replied does not match the VendorTxCode for this transaction. You sent 'xxx', but the database has 'yyy') ...

The VendorTxCode being sent isn't the same as the order GUID which appears to be what the Sagepay system is expecting to verify the transaction.

---
Capture method: DEFERRED
Payment status: AUTHORIZED
Order status: PENDING
Action: CAPTURE
Result: Success

---
Capture method: DEFERRED
Payment status: PAID
Order status: PENDING
Action: REFUND
Result: Success

---
Capture method: DEFERRED
Payment status: AUTHORIZED
Order status: CANCELLED
Action: VOID
Result: Error (INVALID: The VendorTxCode you replied does not match the VendorTxCode for this transaction. You sent 'xxx', but the database has 'yyy') ...

The VendorTxCode being sent isn't the same as the order GUID which appears to be what the Sagepay system is expecting to verify the transaction.


So basically I would not be able to void the transaction unless I go through the Sagepay portal.

Could someone from Microlite come back to me with a solution ASAP please?

Thanks

H
10 years ago
Ok I had quick scan through the source and the API and it appears that the source is generating a new GUID to submit with the VOID POST, whereas it requires the originating order GUID. So by changing:

var voidGuid = Guid.NewGuid();
data.Add("VendorTxCode", voidGuid.ToString());


To

data.Add("VendorTxCode", orderGuid.ToString());



In SagePayServerPaymentProcessor.cs -> public VoidPaymentResult Void(VoidPaymentRequest voidPaymentRequest)

The problem appears to be solved.

However, there appear to be no methods to deal with AUTHENTICATED payments which I assume need to manually captured via the Sagepay UI. Also there is no ABORT method as defined by the Sagepay API which differs slightly from VOID, but then maybe nop doesn't differentiate VOID and ABORT generically.

H
10 years ago
Hi,

Thanks for spotting this - I'll ask our devs to update it in our distribution copy.

You are correct in that nop doesn't differentiate between void and abort so it's not possible to use the abort API call.

Regards,

Nick
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.