Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sean Dooley 288 posts 527 karma points
    Nov 08, 2011 @ 14:37
    Sean Dooley
    0

    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

  • Anders Burla 2560 posts 8256 karma points
    Nov 08, 2011 @ 15:52
    Anders Burla
    0

    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

  • Anders Burla 2560 posts 8256 karma points
    Nov 09, 2011 @ 12:53
    Anders Burla
    0

    Hi Sean

    Did you find the problem?

  • Sean Dooley 288 posts 527 karma points
    Nov 09, 2011 @ 13:40
    Sean Dooley
    0

    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.

  • Anders Burla 2560 posts 8256 karma points
    Nov 09, 2011 @ 14:21
    Anders Burla
    0

    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

  • Sean Dooley 288 posts 527 karma points
    Nov 09, 2011 @ 14:32
    Sean Dooley
    0

    Thanks for your help Anders

  • Sean Dooley 288 posts 527 karma points
    Nov 17, 2011 @ 14:12
    Sean Dooley
    0

    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?

  • Anders Burla 2560 posts 8256 karma points
    Nov 17, 2011 @ 16:25
    Anders Burla
    0

    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

  • Sean Dooley 288 posts 527 karma points
    Nov 17, 2011 @ 17:39
    Sean Dooley
    0

    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?!

  • Anders Burla 2560 posts 8256 karma points
    Nov 17, 2011 @ 17:43
    Anders Burla
    0

    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.

  • Sean Dooley 288 posts 527 karma points
    Nov 17, 2011 @ 18:37
    Sean Dooley
    0

    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?

  • Anders Burla 2560 posts 8256 karma points
    Nov 17, 2011 @ 18:39
    Anders Burla
    0

    Yes before - just to check the name of the order

  • Sean Dooley 288 posts 527 karma points
    Nov 18, 2011 @ 12:31
    Sean Dooley
    0

    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?

  • Anders Burla 2560 posts 8256 karma points
    Nov 18, 2011 @ 15:24
    Anders Burla
    0

    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

  • Sean Dooley 288 posts 527 karma points
    Nov 18, 2011 @ 16:05
    Sean Dooley
    0

    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.

  • Sean Dooley 288 posts 527 karma points
    Nov 18, 2011 @ 17:17
    Sean Dooley
    0

    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.

  • Anders Burla 2560 posts 8256 karma points
    Nov 21, 2011 @ 08:40
    Anders Burla
    0

    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

  • Paul Marden 235 posts 338 karma points MVP c-trib
    Aug 05, 2012 @ 21:38
    Paul Marden
    0

    Anders,

    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)

    And heres the info from the simulator

    PAYMENT transaction.
    Transaction Information
    Vendor TX Code: SLUKORDER-7  
    VPSTxId: {0F01F712-F0AE-4F12-8EA1-640C7DAC56B3}  
    Security Key: GVMW53EM7O  
    Status: Transaction reached registration stage.  
    Description: Sports Leaders UK Merchandise  
    Amount: 11.58 (GBP)   System Used:  Server
    Authorised?: Yes VPS Auth Code: 0
    Started: 05 August 2012 at 20:17:32  
    Refunded?: No   Repeated?: No  
    User: Simulator  Gift Aid?: No - Not a GiftAid compliant transaction. 
    Fraud Screening Information
    CV2 Value:  Not Provided   Post Code Value:  Not Provided  
    Address Numerics:  Not Provided   Checks Performed By: Not known  
  • Anders Burla 2560 posts 8256 karma points
    Aug 06, 2012 @ 13:30
    Anders Burla
    0

    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

  • Paul Marden 235 posts 338 karma points MVP c-trib
    Aug 06, 2012 @ 15:12
    Paul Marden
    0

    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

  • Anders Burla 2560 posts 8256 karma points
    Aug 06, 2012 @ 15:25
    Anders Burla
    0

    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 :)

  • Paul Marden 235 posts 338 karma points MVP c-trib
    Aug 06, 2012 @ 15:52
    Paul Marden
    0

    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

  • Anders Burla 2560 posts 8256 karma points
    Aug 07, 2012 @ 08:09
    Anders Burla
    0

    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

  • Brett 3 posts 23 karma points
    Sep 11, 2012 @ 22:57
    Brett
    0

    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

  • Anders Burla 2560 posts 8256 karma points
    Sep 12, 2012 @ 08:23
    Anders Burla
    0

    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

  • Brett 3 posts 23 karma points
    Sep 12, 2012 @ 10:38
    Brett
    0

    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

  • Brett 3 posts 23 karma points
    Sep 12, 2012 @ 22:46
    Brett
    0

    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

  • Anders Burla 2560 posts 8256 karma points
    Sep 13, 2012 @ 09:55
    Anders Burla
    0

    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

  • Jamie Billington 6 posts 26 karma points
    Oct 02, 2012 @ 12:57
    Jamie Billington
    0

    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

  • Anders Burla 2560 posts 8256 karma points
    Oct 02, 2012 @ 13:01
    Anders Burla
    0

    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

  • Jamie Billington 6 posts 26 karma points
    Oct 02, 2012 @ 13:19
    Jamie Billington
    0

    Hi Andres,

    Thanks :-)

    Just about to send and email to [email protected] - I can get it to work via PayPal.... odd

    Thanks,

    Jamie

  • Jamie Billington 6 posts 26 karma points
    Oct 02, 2012 @ 15:50
    Jamie Billington
    0

    Hi Andres,

    Fixed the problem.... it was my Order id... I had 'EXED/UK'

    Thanks,

     

    Jamie

  • Anders Burla 2560 posts 8256 karma points
    Oct 02, 2012 @ 18:17
    Anders Burla
    0

    Sweet - glad you got it working

Please Sign in or register to post replies

Write your reply to:

Draft