close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

International shipping rates

Thread began 11/25/2010 11:06 pm by jarrad407561 | Last modified 12/10/2010 10:17 am by Jason Byrnes | 2347 views | 11 replies |

jarrad407561

International shipping rates

I've setup my checkout in eCart 5 to lookup shipping rates from Australia Post. I've modified the checkout to show Australian states, and Australia first.
It's works great for anyone within Australia, but if someone in the United States were to put in their address it gets a "shipping quote failed" message (or anywhere else in the world)..

How can I fix this up so that it will work anywhere in the world? As I understand the Australia Post shipping calculator requires the destination post code to be 4 digits long, so in the US and GB where the zip code is longer it will fail??

Also, what can I do about the list for the "state" selection, as I've filled it with Australian states, US customers wont have anywhere to put in their state..??

Any suggestions here would be greatly appreciated!

Cheers,
Jarrad

Sign in to reply to this post

Jason ByrnesWebAssist

The zip code format is dependent on the destination country.

On the destination page of the Australian Post server behavior, make sure that the zip code is bound to the shipping zip code form element, and that the country is bound to the shipping country form element.



You will need to add US states to your state list.

Sign in to reply to this post

jarrad407561

OK thanks.

So the shipping state field doesn't need to be a specific format? I might make it a text field instead then.

How come it fails whenever I put in an international address then?

I might modify the shipping failed page so that it will set the shipping rate to a default cost on failure and then redirect to the confirm page.. Otherwise anyone that can't get the shipping quote to work wont be able to purchase anything..

Thanks for your help.

Sign in to reply to this post

Jason ByrnesWebAssist

the shipping state should be a 2 letter state abbreviation.


can you send the page that has the Australia post behavior applied to it so i can see how it is configured.


If you are passing in the shipping country to the behavior, the zip should not be a problem, it sounds to me like the country is hard coded to Australia, but i cant tell without looking at the code.

Sign in to reply to this post

jarrad407561

I've attached the "confirm" page, which has the shipping quote code in it.

Here are the parameters that it uses


$Shipping_Parameters["ShiptoZip"] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
$Shipping_Parameters["ShiptoCountry"] = "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."";
$Shipping_Parameters["AusPostServer"] = "http://drc.edeliver.com.au/ratecalc.asp";
$Shipping_Parameters["CarrierCode"] = "STANDARD";
$Shipping_Parameters["ShipperZip"] = "5046";


Looks like it uses only the postcode and country, but not state..

I'll attach the checkout page too so you can see the form.

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

jarrad407561

While you are looking at the checkout.php page, can you determine why the checkout with paypal is failing?
If you click on the paypal button it just goes straight to pp_checkout_failure.php

Sign in to reply to this post

jarrad407561

I've bypassed the shipping quote problem by setting a default shipping rate in the database and instead of redirecting to the "shipping_failure.php" page, it now sets it to the default rate on failure..

It would still be good to have the international postage calculation work if you know how, but not a big problem..

The Paypal button is still a big problem though.. What files do you need to look at for this. I have it setup with the PayPal express checkout option using a signature, and if you click on the "checkout with paypal" button it goes straight to the "pp_checkout_failure.php" page...

Sign in to reply to this post

Jason ByrnesWebAssist

on the pp_checkout_failure.php page, add the following code after the <body> tag:

php:
<?php

if(!session_id()) session-start(); 
echo 
"<p>Express Authorize: <br />"
     echo 
"Full Request: ".(isset($_SESSION["ECO_Auth_Request"])?htmlentities($_SESSION["ECO_Auth_Request"]):"n/a")."<br />"
     echo 
"Full Response: ".(isset($_SESSION["ECO_Auth_Result"])?htmlentities($_SESSION["ECO_Auth_Result"]):"n/a")."<br /></p>"
     echo 
"<p>Express Process: <br />"
     echo 
"Full Request: ".(isset($_SESSION["ECO_Process_Request"])?htmlentities($_SESSION["ECO_Process_Request"]):"n/a")."<br />"
     echo 
"Full Response: ".(isset($_SESSION["ECO_Process_Result"])?htmlentities($_SESSION["ECO_Process_Result"]):"n/a")."<br /></p>"
?>




this will write the full request and full response from the gateway to the page for troubleshooting.

NOTE: The full request and full response will contain sensitive information that should be removed before posting here.

Sign in to reply to this post

jarrad407561

Here is the response:

  Express Authorize:
Full Request: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"><Credentials xmlns="urn:ebay:apis:eBLBaseComponents"><Username>correct</Username><Password>correct</Password><Signature>correct</Signature><Subject/></Credentials></RequesterCredentials></soap:Header><soap:Body><SetExpressCheckoutReq xmlns="urn:ebay:api:PayPalAPI"><SetExpressCheckoutRequest><Version xmlns="urn:ebay:apis:eBLBaseComponents">60.0</Version><SetExpressCheckoutRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents"><ReturnURL>http://www.costumesandpartystuff.com.au/pp_confirm.php</ReturnURL><CancelURL>http://www.costumesandpartystuff.com.au/pp_cancel.php</CancelURL><PaymentAction>Authorization</PaymentAction><PaymentDetails><OrderTotal currencyID="USD">212.00</OrderTotal></PaymentDetails></SetExpressCheckoutRequestDetails></SetExpressCheckoutRequest></SetExpressCheckoutReq></soap:Body></soap:Envelope>
Full Response: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ed="urn:ebay:apis:EnhancedDataTypes" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ns="urn:ebay:api:PayPalAPI"><SOAP-ENV:Header><Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xsi:type="wsse:SecurityType"></Security><RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType"><Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType"><Username xsi:type="xs:string"></Username><Password xsi:type="xs:string"></Password><Signature xsi:type="xs:string">correct</Signature><Subject xsi:type="xs:string"></Subject></Credentials></RequesterCredentials></SOAP-ENV:Header><SOAP-ENV:Body id="_0"><SetExpressCheckoutResponse xmlns="urn:ebay:api:PayPalAPI"><Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2010-12-09T02:07:40Z</Timestamp><Ack xmlns="urn:ebay:apis:eBLBaseComponents">Failure</Ack><CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">c9f7465d1d09e</CorrelationID><Errors xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:ErrorType"><ShortMessage xsi:type="xs:string">Security error</ShortMessage><LongMessage xsi:type="xs:string">Security header is not valid</LongMessage><ErrorCode xsi:type="xs:token">10002</ErrorCode><SeverityCode xmlns="urn:ebay:apis:eBLBaseComponents">Error</SeverityCode></Errors><Version xmlns="urn:ebay:apis:eBLBaseComponents">60.0</Version><Build xmlns="urn:ebay:apis:eBLBaseComponents">1613703</Build></SetExpressCheckoutResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

Express Process:
Full Request: n/a
Full Response: n/a  
Sign in to reply to this post

Jason ByrnesWebAssist

the error coming back from payapal is:
Security header is not valid

This error means there is an issue wit hthe API Credentials you have entered.


the three most common causes of this error are:
1) Using Live API Credentials, but sending the request to the Sandbox

2) Using Sandbox credentials but sending the request to the live server

3) Not excepting the paypal billing agreement


make sure the Use Sandbox for testing option is set correctly in the Authorize transaction with Express Checkout server behavior on the checkout page.

if you are certain the api credentials are correct and the sandbox option matches, you may just have bad api credentials, try requesting new ones.

Sign in to reply to this post
loading

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...