Announcement

Collapse
No announcement yet.

SagePay - Change 'Items from' text

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

    SagePay - Change 'Items from' text

    I have tried to edit OCCProtxScriptTemplate as per the AUG.

    I wanted to change:
    Code:
    $sCrypt .= "Description=Items from ". $sMerchantID . "&";
    To say:

    Payment for Order XXXXXXXXXXXXXXX

    This would make life for the accountant so much easier - as at the moment there is no easy way to cross-check payments for items sold using SagePay and Actinic reports.

    I have tried this:
    Code:
    $sCrypt .= "Description=Payment for Order ". $sOrderNumber . "&";
    But receive this error:
    Code:
    Error executing the on-line credit card plug-in script. Global symbol "$sOrderNumber" requires explicit package name at (eval 42) line 134.
    Any ideas what I'm doing wrong, or is the OrderNumber variable simply impossible to send the data to SagePay?

    As the payment reference is usually something like GG54SX90003AB-35364, Actinic must be sending the initial part (GG54SX90003AB) to SagePay, which appends the extra part, 35364 - but can't find the piece of code which sends the order number to SagePay/Protx.

    Everywhere I see Order Number referenced in the OCCProtxScriptTemplate file, it is shown as $::nOrderNumber - what is the difference between this and $sOrderNumber?

    Anyone got any ideas?

    Cheers,
    Grant

    #2
    what happens when you use this

    Code:
    $sCrypt .= "Description=Payment for Order ". $::sOrderNumber . "&";
    or

    Code:
    $sCrypt .= "Description=Payment for Order ". $::nOrderNumber . "&";
    btw, when you see variables with an n or a s this normally means number or string.
    "If my answers frighten you then you should cease asking scary questions"

    Comment


      #3
      Originally posted by chunkesolutions View Post
      what happens when you use this

      Code:
      $sCrypt .= "Description=Payment for Order ". $::sOrderNumber . "&";
      or

      Code:
      $sCrypt .= "Description=Payment for Order ". $::nOrderNumber . "&";
      btw, when you see variables with an n or a s this normally means number or string.
      That explains it - thanks Paul.

      I'm just uploading with 's' at the moment, if no success, will try 'n', if no further success - I'll post a maddened photograph, or the success story

      Cheers
      Grant

      Comment


        #4
        Awesome, for anybody else that wants this in place in case the tax man wants an audit (*hint* you will need this *hint) -

        Open OCCProtxScriptTemplate.pl in the Site1>CommonOCC folder.

        Go to line 115, where you will find:

        $sCrypt .= "Description=Items from ". $MerchantID . "&";

        Replace this with

        $sCrypt .= "Description=Order ". $::sOrderNumber . "&";


        This will change the message shown on the Protx/SagePay page from "Items from merchantname" to "Order GG45SX90001234" - thus, you can easily cross-reference orders between payments - especially if the customer has ordered more than once - the VAT man does not like cross-references, especially when the only matched value is the date and customer name, he (or she) does not like 'coincidences' - only fool-proof statistics and in this case, the order number provides this.

        Comment


          #5
          Hey Grant,

          Not sure why you need to do this becuase the order number is already included on the monthly report within Sagepay and shown on the confirmation emails.

          Also this message is primarily intended for the customer so better to include 'from merchant ID' or 'from domain name'.
          Alan Johnson

          Quality Parrot Cages & Accessories by Parrotize UK
          Pet Accessories by Animal Instinct

          Comment


            #6
            The tax man is unfortunately one-of-a-kind and will do anything to create more problems to deal with - SagePay adds a numeric suffix, ie. GG45SX9000A332-02837 to Actinic's order number.

            Therefore the tax man wanted the payment to show 'Pay for: GG45SX9000A332' to cross reference the payment for this order. The SagePay report shows the full number (ie. including Suffix) therefore with this quick hack, you can now prove order GG45SX9000A332 had Product A, priced at £100 and that the customer did pay the full £100.

            Comment


              #7
              I am not into to pandering to pedantic bureaucrats. We have businesses to run, not just there to collect taxes.

              Make them work for their living like the rest of us.
              Alan Johnson

              Quality Parrot Cages & Accessories by Parrotize UK
              Pet Accessories by Animal Instinct

              Comment


                #8
                Sage Pay Merchant ID

                Sorry to be late asking about this but I have also been trying to edit the OCCProtxScriptTemplate

                $sCrypt .= "Description=Items from ". $sMerchantID . "&";
                The main reason is that the MerchantID with SagePay uses an old company name. They won't let us change our ID and we don't want customers thinking they are buying from someone else!

                I have tried changing to
                $sCrypt .= "Description=Items from Kit Matters "&";
                but it didn't like that.

                Would be grateful if someone could tell me what the correct syntax should be.

                Also, when we get our act together and update to V9 we will be launching some other sites which we hope will use the same Sage Pay account. Is there a way we can change the Description so that we know which website it relates to? Perhaps using COMPANYNAME instead of Merchant ID?

                So for example we might get two receipts or payment confirmations, one from each website with the descriptions....
                You bought :Items from Kit Matters or
                You bought :Items from Layeredup

                Thanks
                Visit the Kit-Matters website. They specialise in the online supply of sports wear and equipment for children and their teams.
                http://www.kit-matters.co.uk

                Comment

                Working...
                X