Trying to setup SagePay simulator with TeaCommerce on a development server. At the moment whenever I'm trying to 'Accept and go to payment', it redirects to the 'Cancel URL' set in TeaCommerce backend - so I know something is working.
Couple of questions
Is there anyway to error check why it is redirecting?
The site is currently running on a test server, where as we have purchased a license for the live server - different domain names. Will this affect trying to test SagePay simulator?
I have followed Anders Burla's SagePay tutorial on his blog. Are there any additional settings that need to be set for SagePay in TeaCommerce backend?
umbracoLog database table shows the following error along with the IP address the Simulator is seeing.
SagePay - Error in GenerateForm - Status: INVALID - Status details: The IP address of the server sending the transaction does not match the valid IP address ranges listed in the Simulator.
When I PING the domain name, I get a different IP address.
I have added both the PING and Simulator IP addresses to the SagePay. Unfortunately still experiencing the same problem. Might have to ask hosting provider to clarify this.
SagePay - Error in GenerateForm - Status: INVALID - Status details: The VendorTxCode 'ORDER-XX' has been used before. Each transaction you send should have a unique VendorTxCode.
Could you try and see in your order table if you already has an order with the same id. The ORDER-XX is just the order prefix and the id of the order so it should not be possible to have the same order id twice. How did you generate that? Maybe you deleted some orders for testing and then the id's got reset in the DB and its now trying to use the same id's again which the payment provider cant handle. Makes sense? :)
Looking at TeaCommerce_Order table, all values in the Id column are unique - correct. Also looking at the transaction history on SagePay, all values for VendorTxCode are unique - correct.
If you can produce the error again - you can try and use Firebug for FireFox and write TeaCommerce.getOrder() and see what the name of the order is - if that exists in your sagepay admin then thats why the error. Then you need to check how you got that id multiple times.
Managed to get 1 order through (Order-66) then same error is occuring. Do I use Firebug to check TeaCommerce.GetOrder() before sending the transaction to SagePay?
Using Firebug to check TeaCommerce.getOrder() shows no issues as the name of each order is unique. SagePay admin shows no order name duplication either.
So I attempted so test orders.
First Order - successful transaction
Second Order - the cart emptied automatically during the checkout process - how is the cart information stored? Is it in a session? We are experiencing session timeout issues with our shared hosting provider.
Third Order- went through the checkout process without any issues. Using Firebug showed a unique order name, but SagePay returned the previously mentioned VenderTxCode error
SagePay - Error in GenerateForm - Status: INVALID - Status details: The VendorTxCode 'ORDER-75' has been used before. Each transaction you send should have a unique VendorTxCode.
Cart information is session stored - so maybe that gives the problems. When you get to the confirmation page of Tea Commerce do you see order information there? Somehow the VendorTxCode is a duplicate - the VendorTxCode is "ORDER-" + the id of the order. So it should not be able to genereate that id again. What if you go to payment, click "back" in your browser and then hits the go to payment button again. Does that also generate the error?
The session issue was due to using shared hosting and the application pool.
For the VendorTxCode, the issue seems to reside with SagePay's Simulator as the majority of transactions fail on the VendorTxCode. They are currently looking into the issue.
Will try using SagePay's Test mode to see if that works.
Great you found out that SagePay was causing the problem and not Tea Commerce. But I actually did my testing of the payment provider with the simulator and never got this kind of error - so dont know if its a new bug with SagePay or just a temporary problem.
I'm getting these Simulator errors as well, from Umbracolog....
iduserIdNodeIdDatestamplogHeaderlogComment
130-12012-08-05 20:17:35.940ErrorTea Commerce - SagePay - Error in GenerateForm - Status: INVALID - Status details: The VendorTxCode 'SLUKORDER-7' has been used before. Each transaction you send should have a unique VendorTxCode.
12002012-08-05 20:17:20.603ErrorTea.UmbracoRedirect failed: /en/cart.aspx - Message: Thread was being aborted. - StackTrace: at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at Tea.UmbracoRedirect.Redirect.OnPostRequestHandlerExecute(Object sender, EventArgs e)
11002012-08-05 20:17:15.800ErrorTea.UmbracoRedirect failed: /en/products.aspx - Message: Thread was being aborted. - StackTrace: at System.Threading.Thread.AbortInternal() at System.Threading.Thread.Abort(Object stateInfo) at System.Web.HttpResponse.End() at Tea.UmbracoRedirect.Redirect.OnPostRequestHandlerExecute(Object sender, EventArgs e)
The Tea.UmbracoRedirect can be updated from the latest starter kit and should remove the logging of that.
The SagePay is because its trying to generate a form for an ID that has already been used. How do you do to get this error? The flow in the webshop? adding to cart - then go to information etc
I'm using a starter kit I downloaded 29-Jun has it been updated since then?
On SagePay I've checked as per Sean's post above and I don't have any orders in the database yet so it's not because the ID has already been used. I even created a Prefix unique to me and still it errors.
I get this error simply by configuring the SagePay provider pointing it to the Simulator and then following the normal ordering process. Once clicking 5. Payment button it redirects straight to the Error page.
I really need to be able to use the Simulator to enable us to test the different types of response, so going to the TEST environment isn't really practical at this stage.
Yes - starter kit updated 03/08-2012 - version 2.2.0.0
I think the error with the ID already used is because SagePay is because of an update to the JavaScript and Tea Commerce starter kit. Could you try and create your order as normal BUT don't go to step 4 here you normally accepts the order. Now in FireBug write "TeaCommerce.goToPayment()" and see if that works. If it does then the error is because the Tea Commerce Generate Payment form is executed twice and SagePay then thinks this is wrong.
Could you try this and see if that works - if its does then we debug why its called twice :)
Great - its because the payment form is generated twice. Properly the form is generated in step 4 in the xslt and also the JavaScript calls goToPayment which in the end generates the form again. So you need to disable the javascript goToPayment or remove the server side fallback form to get it working.
Like Paul, I had a woo hoo moment after getting to step 3 and calling TeaCommerce.goToPayment() via firebug. I suddenly saw a new set of pages within the SagePay simulator site and all was good. Sadly only for a moment. After a couple of clicks on the SagePay pages I received a SagePay page error. Now when I try to go back and put another order through I get "Error parsing XSLT file: \xslt\cart_step04.xslt" on step 4.
Like Paul - did you try and remove the GeneratePaymentForm from step 4 in your cart flow so its only the javascript that generates the form and posts it? Try that.
No, I've not yet done that. Could you please specify how to.
I'm confused about whats happening now. I have seen progress to the sagePay pages after adding gotToPayment() to firebug, received an error message 'Type error: c is null' from firebug after adding gotToPayment() to firebug, had the 'Error parsing XSLT file: \xslt\cart_step04.xslt' error... and all without making any changes.
I have now commented out the javascript line TeaCommerce.goToPayment() in the file teaCommerce_Advanced.js and replaced it with return true; and this seems to have corrected the problem. Still not sure why I was sometimes getting the message "Error parsing XSLT file: \xslt\cart_step04.xslt" on step 4 but am hoping not to see it again now that things seem to be working.
Don't know about the error at step 4. The things discussed ealier in the thread was that SagePay wouldn't allow a payment to be submitted twice. This happens in the starter kit of Tea Commerce because of the ability to have both java script and then serverside fallback. The serverside fallback would generate the form and talk to SagePay that would lock the transaction id. Then when the JavaScript goToPayment method is invoked it generates the form again and post it. But because of SagePay has locked the transaction id it will give an error. So you just have to decide if you want to do it the javascirpt or form post way in the starter kit for SagePay
SagePay integration
Trying to setup SagePay simulator with TeaCommerce on a development server. At the moment whenever I'm trying to 'Accept and go to payment', it redirects to the 'Cancel URL' set in TeaCommerce backend - so I know something is working.
Couple of questions
Is there anyway to error check why it is redirecting?
The site is currently running on a test server, where as we have purchased a license for the live server - different domain names. Will this affect trying to test SagePay simulator?
I have followed Anders Burla's SagePay tutorial on his blog. Are there any additional settings that need to be set for SagePay in TeaCommerce backend?
Thanks for any help
Hi Sean
There should be an error in the umbracoLog database table with the error message. Starts with "Tea Commerce - SagePay" - try search for that.
If you followed the blog things should be cool - but let me hear what you find in the error log
Kind regards
Anders
Hi Sean
Did you find the problem?
Hi Anders
umbracoLog database table shows the following error along with the IP address the Simulator is seeing.
SagePay - Error in GenerateForm - Status: INVALID - Status details: The IP address of the server sending the transaction does not match the valid IP address ranges listed in the Simulator.
When I PING the domain name, I get a different IP address.
I have added both the PING and Simulator IP addresses to the SagePay. Unfortunately still experiencing the same problem. Might have to ask hosting provider to clarify this.
Sounds like a hosting thing - to help others could you mark the right post as a solution so others easily can find it - thanks in advance
Kind regards
Anders
Thanks for your help Anders
Hi Anders
I am now receiving the following error
SagePay - Error in GenerateForm - Status: INVALID - Status details: The VendorTxCode 'ORDER-XX' has been used before. Each transaction you send should have a unique VendorTxCode.
Any ideas?
Could you try and see in your order table if you already has an order with the same id. The ORDER-XX is just the order prefix and the id of the order so it should not be possible to have the same order id twice. How did you generate that? Maybe you deleted some orders for testing and then the id's got reset in the DB and its now trying to use the same id's again which the payment provider cant handle. Makes sense? :)
Kind regards
Anders
Does makes sense what you have said.
Looking at TeaCommerce_Order table, all values in the Id column are unique - correct. Also looking at the transaction history on SagePay, all values for VendorTxCode are unique - correct.
Where is the issue coming from?!
If you can produce the error again - you can try and use Firebug for FireFox and write TeaCommerce.getOrder() and see what the name of the order is - if that exists in your sagepay admin then thats why the error. Then you need to check how you got that id multiple times.
Managed to get 1 order through (Order-66) then same error is occuring. Do I use Firebug to check TeaCommerce.GetOrder() before sending the transaction to SagePay?
Yes before - just to check the name of the order
Using Firebug to check TeaCommerce.getOrder() shows no issues as the name of each order is unique. SagePay admin shows no order name duplication either.
So I attempted so test orders.
First Order - successful transaction
Second Order - the cart emptied automatically during the checkout process - how is the cart information stored? Is it in a session? We are experiencing session timeout issues with our shared hosting provider.
Third Order- went through the checkout process without any issues. Using Firebug showed a unique order name, but SagePay returned the previously mentioned VenderTxCode error
SagePay - Error in GenerateForm - Status: INVALID - Status details: The VendorTxCode 'ORDER-75' has been used before. Each transaction you send should have a unique VendorTxCode.
Any ideas?
Hi Sean
Cart information is session stored - so maybe that gives the problems. When you get to the confirmation page of Tea Commerce do you see order information there? Somehow the VendorTxCode is a duplicate - the VendorTxCode is "ORDER-" + the id of the order. So it should not be able to genereate that id again. What if you go to payment, click "back" in your browser and then hits the go to payment button again. Does that also generate the error?
Kind regards
Anders
Hi Anders
The session issue was due to using shared hosting and the application pool.
For the VendorTxCode, the issue seems to reside with SagePay's Simulator as the majority of transactions fail on the VendorTxCode. They are currently looking into the issue.
Will try using SagePay's Test mode to see if that works.
Thanks for all your help.
Yee haa! SagePay Test mode works!!! Might have got a few more grey hairs but it is processing transactions! #happinessis
Worth making a note for future users that SagePay Simulator mode appears to be inconsistent for Server Integration.
Hi Sean
Great you found out that SagePay was causing the problem and not Tea Commerce. But I actually did my testing of the payment provider with the simulator and never got this kind of error - so dont know if its a new bug with SagePay or just a temporary problem.
Kind regards
Anders
Anders,
I'm getting these Simulator errors as well, from Umbracolog....
And heres the info from the simulator
The Tea.UmbracoRedirect can be updated from the latest starter kit and should remove the logging of that.
The SagePay is because its trying to generate a form for an ID that has already been used. How do you do to get this error? The flow in the webshop? adding to cart - then go to information etc
Kind regards
Anders
Anders,
I'm using a starter kit I downloaded 29-Jun has it been updated since then?
On SagePay I've checked as per Sean's post above and I don't have any orders in the database yet so it's not because the ID has already been used. I even created a Prefix unique to me and still it errors.
I get this error simply by configuring the SagePay provider pointing it to the Simulator and then following the normal ordering process. Once clicking 5. Payment button it redirects straight to the Error page.
I really need to be able to use the Simulator to enable us to test the different types of response, so going to the TEST environment isn't really practical at this stage.
Paul
Yes - starter kit updated 03/08-2012 - version 2.2.0.0
I think the error with the ID already used is because SagePay is because of an update to the JavaScript and Tea Commerce starter kit. Could you try and create your order as normal BUT don't go to step 4 here you normally accepts the order. Now in FireBug write "TeaCommerce.goToPayment()" and see if that works. If it does then the error is because the Tea Commerce Generate Payment form is executed twice and SagePay then thinks this is wrong.
Could you try this and see if that works - if its does then we debug why its called twice :)
woo hoo.
So I get to step 3, then call TeaCommerce.goToPayment() and it transferred me to the Simulator properly, and I was able to process the transaction.
So now we just need to debug what's going on.
I'll dm you the url for the site and you can have a look if you like.
P
Hi Paul
Great - its because the payment form is generated twice. Properly the form is generated in step 4 in the xslt and also the JavaScript calls goToPayment which in the end generates the form again. So you need to disable the javascript goToPayment or remove the server side fallback form to get it working.
Kind regards
Anders
Hi Anders.
Like Paul, I had a woo hoo moment after getting to step 3 and calling TeaCommerce.goToPayment() via firebug. I suddenly saw a new set of pages within the SagePay simulator site and all was good. Sadly only for a moment. After a couple of clicks on the SagePay pages I received a SagePay page error. Now when I try to go back and put another order through I get "Error parsing XSLT file: \xslt\cart_step04.xslt" on step 4.
Thanks for any help and kind regards.
B
Hi Brett
Like Paul - did you try and remove the GeneratePaymentForm from step 4 in your cart flow so its only the javascript that generates the form and posts it? Try that.
Kind regards
Anders
No, I've not yet done that. Could you please specify how to.
I'm confused about whats happening now. I have seen progress to the sagePay pages after adding gotToPayment() to firebug, received an error message 'Type error: c is null' from firebug after adding gotToPayment() to firebug, had the 'Error parsing XSLT file: \xslt\cart_step04.xslt' error... and all without making any changes.
Thanks again
Brett
Hello again Anders,
I have now commented out the javascript line TeaCommerce.goToPayment() in the file teaCommerce_Advanced.js and replaced it with return true; and this seems to have corrected the problem. Still not sure why I was sometimes getting the message "Error parsing XSLT file: \xslt\cart_step04.xslt" on step 4 but am hoping not to see it again now that things seem to be working.
Kind reagrds
Brett
Don't know about the error at step 4. The things discussed ealier in the thread was that SagePay wouldn't allow a payment to be submitted twice. This happens in the starter kit of Tea Commerce because of the ability to have both java script and then serverside fallback. The serverside fallback would generate the form and talk to SagePay that would lock the transaction id. Then when the JavaScript goToPayment method is invoked it generates the form again and post it. But because of SagePay has locked the transaction id it will give an error. So you just have to decide if you want to do it the javascirpt or form post way in the starter kit for SagePay
Kind regards
Anders
Hi I’m trying to integrate Sage Pay into tea commerce, however I'm getting redirected to the Cancel Page... Payment Error.
In the UmbracoLog table I have two rows that show the same errror.
logComment
Tea Commerce - SagePay - Error in GenerateForm - Status: INVALID - Status details: 3035 : The VendorTxCode format is invalid.
logComment
Tea Commerce - SagePay - Error in GenerateForm - Status: INVALID - Status details: 3035 : The VendorTxCode format is invalid.
I’ve followed all the steps in the Anders Burla blog without prevail. I’ve tried both TEST and SIMULATION. Both return the same error twice.....
Addition to this i'm using the tea commerce starter kit 2.0
Any help would be appreciated.
Kind regards
Hi Jamie
Welcome to the Umbraco and Tea Commerce forum!
Could you try and send a screenshot of your settings for your payment method to [email protected]. This can give us an idea of what might be wrong.
Kind regards
Anders
Hi Andres,
Thanks :-)
Just about to send and email to [email protected] - I can get it to work via PayPal.... odd
Thanks,
Jamie
Hi Andres,
Fixed the problem.... it was my Order id... I had 'EXED/UK'
Thanks,
Jamie
Sweet - glad you got it working
is working on a reply...