Announcement

Collapse
No announcement yet.

UK1,UK2 & UK3 with SagePay

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UK1,UK2 & UK3 with SagePay

    Hello all

    Forgive this being in the wrong section but is anyone else having an issue with the old trick of using UK1,UK2 & UK3 for different delivery areas (Country Codes) for I.O.W Ireland NI & Scottish Highlands?

    I don't send to these areas much much but today I got a customer who said he can't pay my I.O.W delivery cost as he gets a 3141 INVALID invoice address from Sagepay. I've not changed a thing and this has worked perfectly since 2015. I have checked the OCCProtxscript file in the CommonOCC folder as below, never changed

    I'm totally lost as to why this would happen unless over night the Country Codes have changed?

    Thanks in advance for any ideas



    sub GetProtxLocationCodes
    {
    my ($sAddress) = @_;
    #
    # Handle country code first
    #
    my $sCountryCode = $::g_LocationInfo{$sAddress . '_COUNTRY_CODE'};
    if ($sCountryCode eq '')
    {
    $sCountryCode = $::g_pSetupBlob->{'MERCHANT_COUNTRY_CODE'};
    }
    #
    # Handle state code according to country
    #
    my $sStateCode = '';
    if (substr($sCountryCode ,0, 2) eq 'UK')
    {
    $sCountryCode = 'GB';
    }
    elsif ($sCountryCode eq 'US')
    {
    my $sRegionKey = $sAddress . '_REGION_CODE';
    $sStateCode = $::g_LocationInfo{$sRegionKey};
    $sStateCode = ($sStateCode ne $ActinicOrder::UNDEFINED_REGION) ?
    ActinicLocations::GetISORegionCode($sStateCode) : "";
    }
    return ($sCountryCode, $sStateCode);

    #2
    It looks like you've maybe been editing the wrong file.

    Note in the new SellerDeck patches the SagePay script file name has been changed from:
    Site1\CommonOCC\OCCPROTXScriptTemplate.pl
    to:
    Site1\CommonOCC\OCCSagePay.pl
    See: Post #8 here https://community.sellerdeck.com/for...lue-is-to-long
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

    -----------------------------------------

    Comment


      #3
      Thanks Mike

      I'll double check that although it has been perfectly fine for years, but I'll give it a check and reply back with a yes or no. Well appreciate the help ;-)

      Comment


        #4
        Just to say thank you Mike, the editing of the OCCSagepay pl works a treat. I did originally see the section you pointed me to but didn't spot the post #8 you pointed me to - thanks for that, because what I didn't spot was the file would "Default" after upgrading from V14 to V16 recently
        Anyway, thanks again ;-)

        Comment


          #5
          Concluded

          Comment


            #6
            Many services nowadays rely on the ISO country codes to correctly identify the country. Inventing countries that don't exist can lead to all sorts of problems. We strongly recommend using the States/Provinces list in Settings > Locations to add different shipping regions per country. Then set up a Shipping Zone mapped to each region via the Zone Properties. See the articles 'Changing The List Of Countries And States' and 'Zones and Classes' in the main help.
            Bruce Townsend
            Ecommerce Product Manager
            Sellerdeck Ecommerce Solutions

            Comment

            Working...
            X