close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Sagepay problem

Thread began 8/17/2012 12:44 am by J7HNW | Last modified 8/22/2012 1:20 pm by J7HNW | 4964 views | 7 replies |

J7HNW

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

Attached Files
webassist.zip
Sign in to reply to this post

Jason ByrnesWebAssist

try changing the crypt element code to:

php:
<input type="hidden" name="Crypt" 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_street2"]))?$_POST["shipping_street2"]:""). """".((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"""); ?>" />




looking at your code example, it looks like you added the shipping 2, but not billing 2 and also add a line break, but its hard to tell.

If your still having a problem, I'll start an incident so we can debug the issue.

Sign in to reply to this post

J7HNW

No Good

I embedded your code

<input type="hidden" name="Crypt" 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_street2"]))?$_POST["shipping_street2"]:""). "", "".((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", ""); ?>" />

This transaction attempt has failed. Please use the Proceed button go back to the web store from which you were purchasing. The details of the failure are given below.


Status:

INVALID

Status Detail:

3027 : The BillingPostCode is too long.


This is the same error I got when I tried it earlier

I have had to reinstate the old code as the site is live

Please advise

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

J7HNW

Problem

Hi Ray

When we had the session last night and I couldnt repoduce the problem - I checked the form afterwards and the extra line of code for address line 2 was missing. I added in and problem re occurred

Please see my e mail attached as PDF

I added the string of code "".((isset($_POST["shipping_street2"]))?$_POST["shipping_street2"]:"") ."", and it stopped sagepay working again

I tested on the Test server at Sagepay and you can see in the attached form the problem I got - Postcode error

Can we look again tonight ?

John

Attached Files
Hi Ray.zip
Sign in to reply to this post

J7HNW

Hi Ray

I have just sent a Skype message. I hadnt ftpd the right file so couldnt recreate issue yesterday

Now can recreate at will. Have turned on teamviewer in case you have a minute to spare

So ready to connect

If not will try again tomorrow.

Many thyanks

John

Sign in to reply to this post

Jason ByrnesWebAssist

Please update the incident on the back end so ray will see you messages and know that you are still having troubles.

Sign in to reply to this post

J7HNW

Thanks Ray

Well done Ray for finding the Bug. Hope this helps others not to have the same issue

Love that Teeshirt !

Cheers

John

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...