I'm having trouble with generating the payment form step in the cart process. I'm using SagePay as the payment provider. I get to the accept step but when I move to the Payment step it sends me straight to the cancel url. I've had a look in App_Data logs and also checked the umbracoLog table but nothing seems to be showing there. It's not even getting to SagePay as nothing is shown in the Simulator either.
I've debugged it in the javascript debugger in Firebug to see where the problem is. Now I can see that it calls TC.GeneratePaymentForm but the server is responding strangely by sending it straight to the cancel url.
I've had a look through the code and it doesn't seem to be even getting to SagePay. The code seems to be fine other than that. I've sniffed the traffic via WireShark and can't see any transaction (although I may be missing it).
Try and download the source code and build it and overwrite your payment provder dll in your website. Then attach the debugger and step through the different line of code.
We've downloaded the source code and overwritten the payment provider. When we call "GetFields" on line 141 in TeaCommerce.PaymentProviders.Classic.SagePay we get this:
We've stepped through the code and now were having difficulty with the country code for UK. It is set to 'GB' but for some reason changes it to GBP, but that's for the currency.
The BillingCountry and DeliveryCountry uses the RegionCode of the payment country and shipping country. So it should not fallback to the currency ISO code... But the source code doesn't do anything like that.
TC.GeneratePaymentForm submitting to cancel URL
Hi,
I'm having trouble with generating the payment form step in the cart process. I'm using SagePay as the payment provider. I get to the accept step but when I move to the Payment step it sends me straight to the cancel url. I've had a look in App_Data logs and also checked the umbracoLog table but nothing seems to be showing there. It's not even getting to SagePay as nothing is shown in the Simulator either.
I've debugged it in the javascript debugger in Firebug to see where the problem is. Now I can see that it calls TC.GeneratePaymentForm but the server is responding strangely by sending it straight to the cancel url.
Thanks in advance,
Alex
Hi Alex
Nothing is logged during the generation of the payment form - so that is properly why you wont see anything.
So try and look at the code and see if any of the things might go wrong and there for the status is not "OK". So that is why it redirects to the cancel url.
https://bitbucket.org/teasolutions/tea-commerce-tea-commerce-payment-providers/src/ca05df6ebdb2d4a2bcffb8591ddf4df72368cb71/Source/TeaCommerce.PaymentProviders/Classic/SagePay.cs?at=default
Kind regards
Anders
Hi Anders,
I've had a look through the code and it doesn't seem to be even getting to SagePay. The code seems to be fine other than that. I've sniffed the traffic via WireShark and can't see any transaction (although I may be missing it).
Is there anything else I'm missing?
KR
Alex
Try and download the source code and build it and overwrite your payment provder dll in your website. Then attach the debugger and step through the different line of code.
Kind regards
Anders
We've downloaded the source code and overwritten the payment provider. When we call "GetFields" on line 141 in TeaCommerce.PaymentProviders.Classic.SagePay we get this:
IDictionary<string, string> responseFields = GetFields( MakePostRequest( GetMethodUrl( "PURCHASE", settings ), inputFields ) );
string status = responseFields[ "Status" ];
Response
{[StatusDetail, 3011 : The NotificationURL format is invalid.]}
Any ideas?
can you see what format the notification url is? It is the teaCommerceCallbackUrl I think.
I can't see the notificationUrl as it's in compiled code and I can track the traffic in WireShark, but can't access the error as it's in SSL
Hi Anders,
We've stepped through the code and now were having difficulty with the country code for UK. It is set to 'GB' but for some reason changes it to GBP, but that's for the currency.
Any idea?
KR
Alex
The BillingCountry and DeliveryCountry uses the RegionCode of the payment country and shipping country. So it should not fallback to the currency ISO code... But the source code doesn't do anything like that.
Kind regards
Anders
Sorry, it was the Region Code configuration setting in TeaCommerce. It was set to 'GBP' when it should have been 'GB'
Thanks for your help
KR
Alex
This still does not work with GB. it just cancels the order without any loging notification or anything....very bad design.
Hi Sean
Have you looked in the Umbraco log file in App_Data/Logs?
Kind regards
Anders
is working on a reply...