Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
 
DeliveryState required error from Sagepay
Posted: 15 March 2012 06:10 AM   [ Ignore ]
Has a Great Personality
Rank
Total Posts:  48
Joined  2011-06-16

BillingState is only sent to sagepay if BillingCountry == ‘US’, and DeliveryState is only sent if DeliveryCountry ==“US”.

However, DeliveryState should default to $this->order(‘state’) if $this->order(‘shipping_state’) is empty. [See line 189 of Cartthrob_sage].

I suggest that you insert the following lines (marked with “>>>>”):

if ("US" != $post_array['DeliveryCountry'])
       
{
           $post_array[
'DeliveryState']  "";
       
}
       
else
       
{
           $post_array[
'DeliveryState'strtoupper($this->order('shipping_state'));
       
}
       
if ("US" != $post_array['BillingCountry'])
       
{
           $post_array[
'BillingState']  ""
       
}
       
else
       
{
           $post_array[
'BillingState'strtoupper($this->order('state')); 
    
>>>>>       if(
$post_array['DeliveryState'== ""){
    
>>>>>        $post_array['DeliveryState'$post_array['BillingState'];
    
>>>>>       
}
   
       } 
Profile
 
 
Posted: 19 March 2012 07:03 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10223
Joined  2008-09-29

I handled it a bit differently, but point taken.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile