Announcement

Collapse
No announcement yet.

Change Order Description passed to Gateway.

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

    Change Order Description passed to Gateway.

    I'm sure this is on here somewhere but I can't anything.

    I want to change the 'Order Description ' passed to the Payment Gateway on Checkout. At the moment it looks to be passing the Merchant Name from the Payment Settings in Business Setttings. I'm not looking to pass a list of products ordered just a fixed bit of text.

    John.
    SellerDeck v16 (Soon to v18)
    John
    Sheltons of Peterborough Ltd
    www.sheltonsfishing.co.uk

    #2
    This is typically set in the occ payment script.

    For example with Sage Pay (in V18) it's

    $hashParams{'Description'} = ACTINIC::EncodeText2("Items from " . $::PSP_MERCHANT_ID, $::FALSE);
    This is in the file OCCSagePay.pl

    I'm pretty sure that details for changing these should be on the forum. IIRC some of the payment template files require changes elsewhere at the same time but I only ever look at these very occasionally so you'll probably have to do some reading to make sure you get everything right.
    -----------------------------------------

    First Tackle - Fly Fishing and Game Angling

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

    Comment


      #3
      Originally posted by Mike Hughes View Post
      This is typically set in the occ payment script.

      For example with Sage Pay (in V18) it's



      This is in the file OCCSagePay.pl

      I'm pretty sure that details for changing these should be on the forum. IIRC some of the payment template files require changes elsewhere at the same time but I only ever look at these very occasionally so you'll probably have to do some reading to make sure you get everything right.
      Hi Mike,
      I had guessed the right file but as to the line, well, I must have mistyped in the Search since my search for "items from" didn't return any hits and yet it is there.
      My line is slightly different in v16.0.3:
      Code:
       $hashParams{'Description'} = "Items from " . $::PSP_MERCHANT_ID;
      I'm going to try Reming that line out and add:
      Code:
       $hashParams{'Description'} = "Items from Sheltons Fishing Tackle";
      Thanks
      John.
      John
      Sheltons of Peterborough Ltd
      www.sheltonsfishing.co.uk

      Comment


        #4
        Just in case it is of help to anyone else:

        There were 2 places in the OCCSagePay.pl
        there should be two instances of this.

        The first should be the line: -
        $hashParams{'Description'} = ACTINIC::EncodeText2("Items from " . $::PSP_MERCHANT_ID, $::FALSE);

        Looking at the last part of the line: -
        ("Items from " . $::PSP_MERCHANT_ID, $::FALSE);

        Replace this with: -
        ("Whatever text you want");

        So that the line now looks like this: -
        $hashParams{'Description'} = ACTINIC::EncodeText2("Whatever text you want");

        Obviously replacing 'Whatever text you want' with your chosen text.

        Once you have done this scroll down to the second instance of 'Items from' where you will see: - $hashParams{'Description'} = "Items from " . $::PSP_MERCHANT_ID;

        and once again change the back end of the line to your desired text so that is looks like this: - $hashParams{'Description'} = "Whatever text you wish";

        Then save and close the file and upload the site.

        Once you have done this, whatever text you have entered will appear on the initial payment page.
        John
        Sheltons of Peterborough Ltd
        www.sheltonsfishing.co.uk

        Comment


          #5
          Unfortunately SellerDeck Support gave wrong information as the First Line of code was incorrect and will Truncate to the first Word, in their instance 'Whatever'. The First line to change in OCCSage.pl requires the FALSE Parameter being passed, so the line should have been:

          Code:
          $hashParams{'Description'} = ACTINIC::EncodeText2("Whatever text you want", $::FALSE);
          NOT
          Code:
          $hashParams{'Description'} = ACTINIC::EncodeText2("Whatever text you want");

          I have put "Items from www.sheltonsfishing.co.uk"

          Sometimes '.' can break code as Perl sees '.' as Concatenation, i.e. when you want add a Parameter to text as in the original code:
          Code:
          $hashParams{'Description'} = ACTINIC::EncodeText2("Items from " . $::PSP_MERCHANT_ID, $::FALSE);
          Fortunately in this instance it isn't, so we can use '.' or Web addresses.
          John
          Sheltons of Peterborough Ltd
          www.sheltonsfishing.co.uk

          Comment

          Working...
          X