Sagepay form Integration keeps giving error 5080 (Form transaction registration failed)
Solution 1
I have finally figured it out. I was sending the crypt field across but not the other data like txt type.
It was me being silly, although it would have been nice to get a error from Sagepay which actually was relevant to the issue rather than something so general you start looking in irrelevant places to solve the issue.
Solution 2
It was your BillingCountry and DeliveryCountry fields - you should use ISO 2 character values. You had 'UNITED KINGDOM' in there - should be 'GB'.
Solution 3
Login to your Sagepay account & go to the invalid transactions, click a transaction & you will see the exact error that is causing the 5080 error.
S.Simkhada
Updated on October 08, 2022Comments
-
S.Simkhada over 1 year
I have been trying to implement sage pay's form integration. Every time i submit a form i keep getting error code:5080 (Error description: transaction registration failed). I tried searching for error code in sagepays website (https://www.sagepay.co.uk/support/error-codes) but apparently this error code doesn't exist. If i type in the error description in sagepay's error code page, rather than the error code then i get the following result screenshot
However both my success url and failure url are present.
What is going on here?
Edit:
VendorTxCode=16-07-20-12-43-55-145161808&ReferrerID=&Amount=3,500.00&Currency=GBP&Description=Clarice Cliff SUNRAY LOTUS JUG C.1930&SuccessURL=http://test.co.uk/baskets/sagepay_success&FailureURL=http://test.co.uk/baskets/sagepay_failure&CustomerName=&CustomerEMail=&VendorEMail=&SendEMail=&eMailMessage=&BillingSurname=Tester&BillingFirstnames=Tester&BillingAddress1=Test Street&BillingAddress2=&BillingCity=London&BillingPostCode=TE14 1EE&BillingCountry=UNITED KINGDOM&BillingState=&BillingPhone=&DeliverySurname=Tester&DeliveryFirstnames=Tester&DeliveryAddress1=Test Street&DeliveryAddress2=&DeliveryCity=London&DeliveryPostCode=TE14 1EE&DeliveryCountry=UNITED KINGDOM&DeliveryState=&DeliveryPhone=&Basket=&AllowGiftAid=&ApplyAVSCV2=&Apply3DSecure=&BillingAgreement=&BasketXML=&CustomerXML=&SurchargeXML=&VendorData=&ReferrerID=&Language=&Website=
-
S.Simkhada almost 8 yearsHi Rik, i have changed it so that both the fields display GB instead of United Kingdom. But i am still getting the same error. BTW i used (github.com/tolzhabayev/sagepayForm-php) this plugin as i was struggling to achieve the encryption and encode using the php kit provided by sagepay. Thanks
-
Rik Blacow almost 8 yearsThen I suspect it is a problem with your encryption algorithm - worked fine for me with my java implementation....
-
Rik Blacow almost 8 yearsThis PHP example in my answer below works (at least it did - been ages since I did anything with it!)
-
S.Simkhada almost 8 yearsHi, Rik. I implemented your code (I assumed that the $key in encryptAes function is the encryption password?), but still no luck I get the same error. The fact that i am using using sagepay's test (test.sagepay.com/gateway/service/vspform-register.vsp) should really matter should it?
-
Rik Blacow almost 8 yearsShouldn't make a difference, but the encryption keys are different on each platform
-
S.Simkhada almost 8 yearsI am still working through the test gateway though. I am using my test encryption key and I am still getting 5080 issue. Just for the sake of it i tired using the live encryption key with (live.sagepay.com/gateway/service/vspform-register.vsp) this. Still no luck. However when i logged in to live account it said my account is not up to date. But i am using 3.00 on my forms. This is getting more and more confusing .
-
S.Simkhada almost 8 yearsI have the right encryption key, but again still no luck. Perhaps the problem is not the encryption ?