Morning All!
Could anyone help with this... I am using SagePay Form as a payment method but all my customers are getting the below error when they checkout. The error is shown at Sage's site...
Form Transaction Error
This transaction attempt has failed. Please use the Proceed button go back to the web store from which you were purchasing. The details of the failure are given below.
Status:
MALFORMED
Status Detail:
4001 : The VendorTxCode has been used before. All VendorTxCodes should be unique.
Any help is much appreciated. I have cleared system/cache with no joy.
Thanks,
Jazz
Could anyone help with this... I am using SagePay Form as a payment method but all my customers are getting the below error when they checkout. The error is shown at Sage's site...
Form Transaction Error
This transaction attempt has failed. Please use the Proceed button go back to the web store from which you were purchasing. The details of the failure are given below.
Status:
MALFORMED
Status Detail:
4001 : The VendorTxCode has been used before. All VendorTxCodes should be unique.
Any help is much appreciated. I have cleared system/cache with no joy.
Thanks,
Jazz
oc. 1.5.1.1
Ok I have some more info and know what the problem is...
We use SagePay for Card Processing. OC Passes a 'VendorTXCode' (orderid), e.g 1, 2, 3, 4 etc
But in the past we have already used the codes 1, 2, 3, 4 etc in SagePay with another shop.
So now OC is trying to send same codes and SagePay does not allow duplicates, so basically I need a prefix on the VendorTXCode (orderid), e.g xx-1, xx-2, xx-3, xx-4, etc
Any Ideas?
Ok I have some more info and know what the problem is...
We use SagePay for Card Processing. OC Passes a 'VendorTXCode' (orderid), e.g 1, 2, 3, 4 etc
But in the past we have already used the codes 1, 2, 3, 4 etc in SagePay with another shop.
So now OC is trying to send same codes and SagePay does not allow duplicates, so basically I need a prefix on the VendorTXCode (orderid), e.g xx-1, xx-2, xx-3, xx-4, etc
Any Ideas?
Hi ikfranklin,
The error occurs because you have used the transaction code sent to sagepay before, maybe in another installation of oc or may be another cart. So, look through your old tx codes on sagepay or call sagepay to see what the last largest number was then run the below SQL to increase the starting number oc uses to send to sagepay in your current shop.
ALTER TABLE `order` AUTO_INCREMENT =10000
Example above starts the tx numbers from 10000.
I found this in a semi related article here... http://forum.opencart.com/viewtopic.php?t=5929 so a thank you to them.
The error occurs because you have used the transaction code sent to sagepay before, maybe in another installation of oc or may be another cart. So, look through your old tx codes on sagepay or call sagepay to see what the last largest number was then run the below SQL to increase the starting number oc uses to send to sagepay in your current shop.
ALTER TABLE `order` AUTO_INCREMENT =10000
Example above starts the tx numbers from 10000.
I found this in a semi related article here... http://forum.opencart.com/viewtopic.php?t=5929 so a thank you to them.
Firstly sorry for starting up an old thread but I couldn't see another solution in the forum.
Reading the article linked by silentmedia I've tried a different approach to this. I think adding a "Store ID" and "Customer ID" prefix will give it the unique store related number that we need for sagepay.
I've started looking at the code but for some reason what I thought would be a simple string amendment isnt working. I'm editing the ../controller/payment/sagepay.php file and where it sets the 'VendorTXCode' I have amended similar to below:
$data['VendorTxCode'] = $this->session->data['store_id'] . '_' . $order_info['customer_id'] . '_' . $this->session->data['order_id'];
But this doesnt seem to be changing anything. I've even tried simpler strings ie:
$data['VendorTxCode'] = "ABC" . $this->session->data['order_id'];
and this doenst seem to do anything either. Am I missing something simple? Could it be something to do with the Cache?
Reading the article linked by silentmedia I've tried a different approach to this. I think adding a "Store ID" and "Customer ID" prefix will give it the unique store related number that we need for sagepay.
I've started looking at the code but for some reason what I thought would be a simple string amendment isnt working. I'm editing the ../controller/payment/sagepay.php file and where it sets the 'VendorTXCode' I have amended similar to below:
$data['VendorTxCode'] = $this->session->data['store_id'] . '_' . $order_info['customer_id'] . '_' . $this->session->data['order_id'];
But this doesnt seem to be changing anything. I've even tried simpler strings ie:
$data['VendorTxCode'] = "ABC" . $this->session->data['order_id'];
and this doenst seem to do anything either. Am I missing something simple? Could it be something to do with the Cache?
I'm sorry for reviving an old thread but I really need help understanding why the previous posters solution doesn't work. I want to add a number to the end of the orderId as if the customer backs out of the payment and then retries to make the payment the orderId is the same and so the payment returns the error
I can't get this code to work and don't know why:-
$data['VendorTxCode'] = $this->session->{data['order_id'] . time()};
I'm really using the time() as a unique random number generator, but it doesn't work :-(
Any tips to get this to work?
I can't get this code to work and don't know why:-
$data['VendorTxCode'] = $this->session->{data['order_id'] . time()};
I'm really using the time() as a unique random number generator, but it doesn't work :-(
Any tips to get this to work?
It took me ages to get something to work, but I got there eventually.
I put the result of the time() function into a variable and then put the variable on to the end of the order_id.
This is shown in the code below.
I'm not sure why the other way didn't work, if anyone can explain I would appreciate it.
Also any comments on this solution would be appreciated
I put the result of the time() function into a variable and then put the variable on to the end of the order_id.
This is shown in the code below.
Code: Select all
$t = time() ;
$data['VendorTxCode'] = $this->session->{data['order_id'] . $t };
Also any comments on this solution would be appreciated
Who is online
Users browsing this forum: No registered users and 2 guests