I'm setting up a simple PHP form to send transactions to sagepay using form integration, the cryptkey is setup as follows:
$PAYMENT_CRYPT =
"VendorTxCode=website
&Amount=$total
&Currency=GBP
&Description=Ticket
&SuccessURL=EDITED-OUT/registered-thanks
&FailureURL=EDITED-OUT/registered-fail
&BillingSurname=$surname
&BillingFirstnames=$firstname
&BillingAddress1=$address1
&BillingCity=$city
&BillingPostCode=$postcode
&BillingCountry=UK
&DeliverySurname=$surname
&DeliveryFirstnames=$firstname
&DeliverAddress1=$address1
&DeliveryCity=$city
&DeliveryPostCode=$postcode
&DeliveryCountry=UK
&AllowGiftAid=1"
Form:
<form action="https://live.sagepay.com/gateway/service/vspform-register.vsp" method="POST" id="SagePayForm" name="SagePayForm">
<input type="hidden" name="VPSProtocol" value="2.23" />
<input type="hidden" name="TxType" value="PAYMENT" />
<input type="hidden" name="Vendor" value="MYVENDORID" />
<input type="hidden" name="Crypt" value="<?= $PAYMENT_CRYPT ?>">
<input type="image" src="images/buynow-sagepay.png" />
</form>
Sage is giving me an error as follows, which makes no sense since the currency field is most definitely being passed.
This transaction attempt has failed. We are unable to redirect you back to the web store from which you were purchasing. The details of the failure are given below.
Status: MALFORMED
Status Detail: 3045 : The Currency field is missing.
Any help would be much appreciated!
Rick