Sagepay problem
We are using FORM from Sagepay with E Cart
When we transmit an order all works - but the form generated by Sagepay which is the e mailed confirmation of a successful transaction is missing line 2 from the address on Billing and Shipping addresses
Sage say this depens on what we throw at their server from the confirm page
At the moment the code generated by ECart5 is
id="Crypt" value="<?php echo WA_Protx_VSPFormHash($WeeRideUK, "8GejG5SG2jCjMsbY", "".WAEC_getTimestamp() ."", "".$WeeRideUK->GrandTotal() ."", "GBP", "".WAEC_getTimestamp() ."", "http://www.weerideuk.co.uk/checkout_success.php", "http://www.weerideuk.co.uk/checkout_failure.php", "".((isset($_POST["email"]))?$_POST["email"]:"") ."", "sales@weerideuk.co.uk", "".((isset($_POST["shipping_lastname"]))?$_POST["shipping_lastname"]:"") ."", "".((isset($_POST["shipping_firstname"]))?$_POST["shipping_firstname"]:"") ."", "".((isset($_POST["shipping_street1"]))?$_POST["shipping_street1"]:"") ."", "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."", "".((isset($_POST["shipping_city"]))?$_POST["shipping_city"]:"") ."", "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."", "".((isset($_POST["lastname"]))?$_POST["lastname"]:"") ."", "".((isset($_POST["firstname"]))?$_POST["firstname"]:"") ."", "".((isset($_POST["street1"]))?$_POST["street1"]:"") ."", "".((isset($_POST["postcode"]))?$_POST["postcode"]:"") ."", "".((isset($_POST["city"]))?$_POST["city"]:"") ."", "".((isset($_POST["country"]))?$_POST["country"]:"") ."", "".((isset($_POST["phone"]))?$_POST["phone"]:"") ."", "".((isset($_POST["fax"]))?$_POST["fax"]:"") ."", "0", "0", "0", ""); ?>" />
<input type="button" value="Modify information" class="eC_FormButton" onclick="history.back();return false;"/><input type="submit" name="Submit_order" id="Submit_order" value="Checkout" class="eC_FormButton" /></td>
I note that the field missing from the sagepay receipt is called shipping_street2 which comes form the Checkout form field street2
How can I embed this into the crypt string.
Is it just added after street 1 like this
id="Crypt" value="<?php echo WA_Protx_VSPFormHash($WeeRideUK, "8GejG5SG2jCjMsbY", "".WAEC_getTimestamp() ."", "".$WeeRideUK->GrandTotal() ."", "GBP", "".WAEC_getTimestamp() ."", "http://www.weerideuk.co.uk/checkout_success.php", "http://www.weerideuk.co.uk/checkout_failure.php", "".((isset($_POST["email"]))?$_POST["email"]:"") ."", "sales@weerideuk.co.uk", "".((isset($_POST["shipping_lastname"]))?$_POST["shipping_lastname"]:"") ."", "".((isset($_POST["shipping_firstname"]))?$_POST["shipping_firstname"]:"") ."", "".((isset($_POST["shipping_street1"]))?$_POST["shipping_street1"]:"") ."", "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."", "".((isset($_POST["shipping_city"]))?$_POST["shipping_city"]:"") ."", "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."", "".((isset($_POST["lastname"]))?$_POST["lastname"]:"") ."", "".((isset($_POST["firstname"]))?$_POST["firstname"]:"") ."", "".((isset($_POST["street1"]))?$_POST["street1"]:"") ."",
"".((isset($_POST["street2"]))?$_POST["street2"]:"") ."","".((isset($_POST["postcode"]))?$_POST["postcode"]:"") ."", "".((isset($_POST["city"]))?$_POST["city"]:"") ."", "".((isset($_POST["country"]))?$_POST["country"]:"") ."", "".((isset($_POST["phone"]))?$_POST["phone"]:"") ."", "".((isset($_POST["fax"]))?$_POST["fax"]:"") ."", "0", "0", "0", ""); ?>" />
<input type="button" value="Modify information" class="eC_FormButton" onclick="history.back();return false;"/><input type="submit" name="Submit_order" id="Submit_order" value="Checkout" class="eC_FormButton" /></td>
Please can you tell me why the confirm.php form was missing the Billing field for Address 2 and the field when it was created by your App ?
I have tried ading the "".((isset($_POST["street2"]))?$_POST["street2"]:"") and the "".((isset($_POST["shipping_street2"]))?$_POST["shipping_street2"]:"") ."", into the confirm page string -but it causes Sagepay to throw up an error saying the postcode is too long
I attach the working pages for Checkout holding the problem field and confirm which transmits
Please can you advise on which code to change
The sagepay e mailed receipt shows
Delivery Address:
Jo Newman
Craven Cottage
Seer Green
HP9 2QP
GB
Billing Address:
Jo Newman
Craven Cottage
Seer Green
HP9 2QP
GB
Card Address:
Joanne Newman
111 Cape Three Points Road
Avoca Beach
2251
AU
The cart database capture of the code is fine and shows the missing field so the databsae is capturing
OrderShipAddress2:41 Chalfont Road
Details
OrderID: 281
OrderAmount: £45
OrderShipName: Jo Newman
OrderShipAddress: Craven Cottage
OrderShipAddress2:41 Chalfont Road
OrderCity: Seer Green
OrderState:
OrderZip: HP9 2QP
OrderCountry: GB
OrderPhone: 01753887186
OrderFax:
OrderShipping: 0
OrderTax: 0
OrderEmail: jo@weeride.com.au
OrderDate: 2012-08-14 12:52:59
OrderShipped: 0
OrderTrackingNumber:
So the problem is I need to show the OrderShipAddress2:41 Chalfont Road in the emailed Sagepay receipt