Skip to main content

Add promotion sources

Overview

Use the addPromotionSources method to define new sources for an existing promotion.

Parameters

Parameter Type/Description

sessionID

Required (string)

 

Output of the Login method.

promotionCode

Required (string)

 

The code corresponding to the promotion that you want to add products to.

promotionSources

Required (string array)

 

Array of strings defining the promotion sources.

Response

Parameter Type/Description

promotionSources

String array

 

Array of strings defining the promotion sources.

Request

<?php

function callRPC($Request, $host, $Debug = true) {
    $curl = curl_init($host);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($curl, CURLOPT_VERBOSE, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($curl, CURLOPT_SSLVERSION, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json'));
    $RequestString = json_encode($Request);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $RequestString);
    if ($Debug) {
        $RequestString;
    }
    $ResponseString = curl_exec($curl);
    if ($Debug) {
        $ResponseString;
    }
    if (!empty($ResponseString)) {
        var_dump($ResponseString);
        $Response = json_decode($ResponseString);
        if (isset($Response->result)) {
            return $Response->result;
        }
        if (!is_null($Response->error)) {
            var_dump($Request->method, $Response->error);
        }
    } else {
        return null;
    }
}

$host = 'https://api.avangate.com/rpc/3.1/';

$merchantCode = "YOUR_MERCHANT_CODE"; // your account's merchant code available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php
$key = "YOUR_SECRET_KEY"; // your account's secret key available in the 'System settings' area of the cPanel: https://secure.avangate.com/cpanel/account_settings.php

$string = strlen($merchantCode) . $merchantCode . strlen(gmdate('Y-m-d H:i:s')) . gmdate('Y-m-d H:i:s');
$hash = hash_hmac('md5', $string, $key);

$i = 1;

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'login';
$jsonRpcRequest->params = array($merchantCode, gmdate('Y-m-d H:i:s'), $hash);
$jsonRpcRequest->id = $i++;

$sessionID = callRPC($jsonRpcRequest, $host);

// Promotion code corresponding to the promotion you want to add sources to
$promotionCode = '';

// Sources array with the source values 
$sources = ['source1', 'source2'];

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'addPromotionSources',
'params' => array($sessionID, $promotionCode, $sources)
);
var_dump (callRPC($jsonRpcRequest, $host));

Checkout advanced options

Checkout Advanced Options

You can benefit from a whole list of advanced options when using the 2Checkout hosted checkout:

Order language 

Select the "AUTO" option for the order language to let 2Checkout select the checkout language depending on the customer's browser language preferences.

Billing currency

Select the "AUTO" option for the billing currency to let 2Checkout select the billing currency depending on the customer's location. 

Compact shopping cart fields

Check to compact and minimize the number of mandatory cart fields shoppers need to fill in during the purchase process. Read more here.

Order template

Use either the default interface template assigned to your products for the checkout process or override the product group configuration and select a specific design.

Your link source

The link source for the sales. Use the SRC parameter to track every sale point generator (e.g. homepage, product page, etc.)

Affiliate ID

Assign the order and associated commission for the sale to a specific affiliate. 

Payment method

Preselect the payment method for the order.

Coupon code

Add a valid coupon code to the parameter COUPON= and the appropriate discount will be deducted from the product price and displayed in the shopping cart and/or checkout page.

Additional information

E.g.: Free download, etc.

Pre-check extra checkout options 

Check the boxes below to automatically display the options as preselected in the shopping cart (by default, none of them is preselected).

  •  Auto-select the Backup Media option
  •  Auto-select Download Insurance option
  •  Auto-select cross-selling products
  •  Auto-select gift option

Place an order

Overview

Use the placeOrder method to create an order and collect the payment.

Supported payment methods

  1. Credit/Debit cards: Visa, Visaelectron, MasterCard, Maestro, Amex, Discover, Dankort, Carte Bancaire, JCB. 2Checkout supports local Brazilian cards.
  2. PayPal and PayPal Express
  3. Purchase Order
  4. Wire
  5. Check
  6. WeChat
  7. iDEAL
  8. Previous order references - In addition to the payment methods enumerated above, 2Checkout also supports 1-click purchase flows in which you use valid previous order references belonging to returning customers to pay for new orders with their previously used cards and PayPal accounts. 

For antifraud purposes, 2Checkout limits the number of successive purchases made using the same credit card.

Requirements

As reseller of your products, 2Checkout must validate your compliance with the PCI requirements, making sure you meet Payment Card Industry (PCI) standards when using the New Purchase 2Checkout API. You alone control the level of complexity of your PCI compliance. 

Details on some of the most frequent PCI compliance levels for ecommerce businesses and the associated steps you need to follow to obtain the compliance and be able to start using the New Purchase 2Checkout API are available here: New Purchase 2Checkout API PCI DSS Requirements.

You're required to include the following text when using 2Checkout API-client side encryption and to make it visible for your customers in the ordering interface. 

Order processed by 2Checkout, authorized reseller and merchant of the products and services offered within this store. 

Currency support

Check with 2Checkout support for a list of currencies available for each payment method. 

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

Order

Required (Object)

 

Object designed to collect all data necessary for an order, including billing, product/subscription plan and payment details.

Response

Order information

Object

Request


<?php
 
//The following script let's you place an new order with Credit/Debit cards as the payment method
 
$host   = "https://api.2checkout.com";
$client = new SoapClient($host . "/soap/4.0/?wsdl", array(
    'location' => $host . "/soap/4.0/",
    "stream_context" => stream_context_create(array(
        'ssl' => array(
            'verify_peer' => false,
            'verify_peer_name' => false
        )
    ))
));
function hmac($key, $data)
{
    $b = 64; // byte length for md5
    if (strlen($key) > $b) {
        $key = pack("H*", md5($key));
    }
    
    $key    = str_pad($key, $b, chr(0x00));
    $ipad   = str_pad('', $b, chr(0x36));
    $opad   = str_pad('', $b, chr(0x5c));
    $k_ipad = $key ^ $ipad;
    $k_opad = $key ^ $opad;
    return md5($k_opad . pack("H*", md5($k_ipad . $data)));
}
$merchantCode = "YOUR_MERCHANT_CODE";// your account's merchant code available in the 'System settings' area of the cPanel.
$key = "YOUR_SECRET_KEY";// your account's secret key available in the 'System settings' area of the cPanel.
$now          = gmdate('Y-m-d H:i:s'); //date_default_timezone_set('UTC')
$string = strlen($merchantCode) . $merchantCode . strlen($now) . $now;
$hash   = hmac($key, $string);
try {
    $sessionID = $client->login($merchantCode, $now, $hash);
}
catch (SoapFault $e) {
    echo "Authentication: " . $e->getMessage();
    exit;
}
$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = 'usd';
$Order->Country = 'US';
$Order->Language = 'en';
$Order->CustomerIP = '91.220.121.21';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->Affiliate = new stdClass();
$Order->Affiliate->AffiliateCode = 'Partner123'
$Order->Affiliate->AffiliateSource = 'MobilePlatform'
$Order->CustomerReference = NULL;
$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'my_subscription_1';
$Order->Items[0]->Quantity = 1; 
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false; 
$Order->Items[0]->AdditionalFields = NULL;
$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'FirstName';
$Order->BillingDetails->LastName = 'LastName';
$Order->BillingDetails->CountryCode = 'us';
$Order->BillingDetails->State = 'California';
$Order->BillingDetails->City = 'LA';
$Order->BillingDetails->Address1 = 'Address example';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '90210';
$Order->BillingDetails->Email = 'customer@email.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = NULL;
$Order->DeliveryDetails = NULL;
$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'CC';
$Order->PaymentDetails->Currency = 'usd';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->CustomerIP = '10.10.10.10';
$Order->PaymentDetails->PaymentMethod->RecurringEnabled = true;
$Order->PaymentDetails->PaymentMethod->CardNumber = "4111111111111111";
$Order->PaymentDetails->PaymentMethod->CardType = 'visa';
$Order->PaymentDetails->PaymentMethod->ExpirationYear = '2019';
$Order->PaymentDetails->PaymentMethod->ExpirationMonth = '12';
$Order->PaymentDetails->PaymentMethod->HolderName = 'John';
$Order->PaymentDetails->PaymentMethod->CardNumberTime = 83.21; // can be null - high value in seconds is a red flag for fraud attempts.
$Order->PaymentDetails->PaymentMethod->HolderNameTime = 13.35; // can be null - high value in seconds is a red flag for fraud attempts.
$Order->PaymentDetails->PaymentMethod->CCID = '123';
$Order->Promotions = [];
$Order->AdditionalFields = NULL;
$Order->LocalTime = NULL;
$Order->GiftDetails = NULL;
try {
    $newOrder = $client->placeOrder($sessionID, $Order);
}
catch (SoapFault $e) {
    echo "newOrder: " . $e->getMessage();
    exit;
}
var_dump("newOrder", $newOrder);
?>

Update a promotion

Overview

Parameters

Response

Request

<?php 

class Client
{
    protected static $merchantCode;
    protected static $loginDate;
    protected static $hash;
    protected static $baseUrl;
    protected static $callCount = 0;
    protected static $sessionId = '';

    protected static $client;

    public static function setCredentials($code, $key)
    {
        static::$merchantCode = $code;
        static::$loginDate = gmdate('Y-m-d H:i:s');
        static::$hash = hash_hmac('md5', strlen($code) . $code . strlen(static::$loginDate) . static::$loginDate, $key);
        static::$sessionId = static::login();
    }

    public static function setBaseUrl($url)
    {
        static::$baseUrl = $url;
    }

    public static function login()
    {
        $client = static::getClient();
        return $client->login(static::$merchantCode, static::$loginDate, static::$hash);
    }

    public static function __callStatic($name, $arguments = array())
    {
        $client = static::getClient();

        array_unshift($arguments, static::$sessionId);
        $response = call_user_func_array(array($client, $name), $arguments);

        return $response;
    }

    protected static function getClient()
    {
        $opts = array(
            'http'=> ['user_agent' => 'PHPSoapClient'],
            'ssl' => [
                'verify_peer' => false,
                'verify_peer_name' => false,
            ],
        );

        if (null === static::$client) {
            static::$client = new \SoapClient(static::$baseUrl . '?wsdl', [
                'location' => static::$baseUrl,
                'cache_wsdl' => WSDL_CACHE_NONE,
                'stream_context' => stream_context_create($opts),
            ]);
        }

        return static::$client;
    }
}

Client::setBaseUrl('https://api.avangate.com/soap/3.1/');
Client::setCredentials('YOUR_MERCHANT_CODE', 'YOUR_SECRET_KEY');
Client::login();

// Retrieve promotion details
$promotionCode = 'PROMOTION_CODE'; // code of the promotion that you want to update
$existingPromotion = Client::getPromotion($promotionCode); // Keep the promotion you want to update in $existingPromotion

// Set the fields to update
$existingPromotion->Name = 'YOUR_UPDATED_NAME';

// Update the promotion
$response = Client::updatePromotion($existingPromotion);
var_dump($response);

Generate SKU schema

Overview

Use the getSchema method to create a new SKU schema and define the combination criteria. The SKU number is a unique combination of Product ID (Product Code) plus all or minimum one of the following:

  • Currencies
  • Volume Discounts
  • Purchase Types
  • Pricing Options

Request Parameters

Parameters Required Type/Description
productCode Required String.  Product code as available in the Merchant Control Panel.
currencies Required String.
purchaseTypes Required String. The type of purchase applicable to the product: NEW_PRODUCT, RENEWAL, TRIAL, UPGRADE.
pricingConfigurationCodes Required  
                               code Required  
                               volumeDiscounts Required  
                               optionGroups Required  

Request Example

<?php

require ('PATH_TO_AUTH');

$inputSchema = new \stdClass();
$inputSchema->Products = [];
$inputSchema->Products[0] = new \stdClass();
$inputSchema->Products[0]->Code = '6B3CB17DDA_COPY1';
$inputSchema->Products[0]->Currencies = ['USD', 'EUR', 'GBP', 'BGN'];
$inputSchema->Products[0]->PurchaseTypes = ['NEW_PRODUCT', 'RENEWAL'];
$inputSchema->Products[0]->PricingConfigurationCodes = [];
$inputSchema->Products[0]->PricingConfigurationCodes[0] = new \stdClass();
$inputSchema->Products[0]->PricingConfigurationCodes[0]->Code = 'E684EC99B0';
$inputSchema->Products[0]->PricingConfigurationCodes[0]->VolumeDiscounts = [[1, 3], [4, 7]];
$inputSchema->Products[0]->PricingConfigurationCodes[0]->OptionGroups = [];
$inputSchema->Products[0]->PricingConfigurationCodes[0]->OptionGroups[0] = new \stdClass();
$inputSchema->Products[0]->PricingConfigurationCodes[0]->OptionGroups[0]->Code = 'GRUP_1';

$jsonRpcRequest = array (
    'method' => 'getSchema',
    'params' => array($sessionID, $inputSchema),
    'id' => $i++,
    'jsonrpc' => '2.0'
);

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));

Response Parameters

Parameters Type/Description
productCode Product code as available in the Merchant Control Panel.
pricingConfigurationCode  
productSku Empty when the list is generated by the platform and with unique values (per vendor) for each line of the file.
currency If currency is not selected to be included in the list (empty or null value) the the API defaults to "ANY". If currency is selected as an element of the SKU list creation, then it will be included - minimum one currency.
fromQty

The minimum value of the intervals set at product level for the specific Pricing configuration (volume discounts). In case volume discounts are not defined, the default value will be '1'.

toQty

The maximum value of the intervals set at product level for the specific Pricing configuration (volume discounts). In case volume discounts are not defined, the default value will be '99999'.

 

The intervals will be defined in the SKU list (at creation and upload) considering the product settings. In case intervals that are not defined in the Control Panel are included in the request, the request will return an error. 

'Expand quantities' should consider distinct SKUs for each qty of the interval. (optional)

purchaseType Purchase types will have one or multiple of the following values: 'NEW_PRODUCT', 'RENEWAL', TRIAL', 'UPGRADE' - limited to what is defined at product level.
pricingOptionGroups

Can be multiple and each of them will have the GroupCode and for each pricing options group:

pricingOptions

Can be multiple and will contain 'Name' and 'Value' as output, the only valid input is the option group code.

 

Response Example

array(1) {
  [0] =>
  class stdClass#7 (2) {
    public $ProductCode =>
    string(16) "6B3CB17DDA_COPY1"
    public $SkuPricingOptions =>
    array(1) {
      [0] =>
      class stdClass#8 (3) {
        public $Code =>
        string(10) "E684EC99B0"
        public $Details =>
        array(64) {
          [0] =>
          class stdClass#9 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#10 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#11 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [1] =>
          class stdClass#12 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#13 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#14 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [2] =>
          class stdClass#15 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#16 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#17 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [3] =>
          class stdClass#18 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#19 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#20 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [4] =>
          class stdClass#21 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#22 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#23 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [5] =>
          class stdClass#24 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#25 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#26 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [6] =>
          class stdClass#27 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#28 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#29 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [7] =>
          class stdClass#30 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#31 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#32 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [8] =>
          class stdClass#33 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#34 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#35 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [9] =>
          class stdClass#36 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#37 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#38 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [10] =>
          class stdClass#39 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#40 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#41 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [11] =>
          class stdClass#42 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#43 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#44 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [12] =>
          class stdClass#45 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#46 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#47 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [13] =>
          class stdClass#48 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#49 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#50 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [14] =>
          class stdClass#51 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#52 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#53 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [15] =>
          class stdClass#54 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "USD"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#55 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#56 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [16] =>
          class stdClass#57 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#58 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#59 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [17] =>
          class stdClass#60 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#61 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#62 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [18] =>
          class stdClass#63 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#64 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#65 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [19] =>
          class stdClass#66 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#67 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#68 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [20] =>
          class stdClass#69 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#70 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#71 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [21] =>
          class stdClass#72 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#73 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#74 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [22] =>
          class stdClass#75 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#76 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#77 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [23] =>
          class stdClass#78 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#79 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#80 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [24] =>
          class stdClass#81 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#82 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#83 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [25] =>
          class stdClass#84 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#85 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#86 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [26] =>
          class stdClass#87 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#88 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#89 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [27] =>
          class stdClass#90 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#91 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#92 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [28] =>
          class stdClass#93 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#94 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#95 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [29] =>
          class stdClass#96 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#97 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#98 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [30] =>
          class stdClass#99 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#100 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#101 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [31] =>
          class stdClass#102 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "EUR"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#103 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#104 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [32] =>
          class stdClass#105 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#106 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#107 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [33] =>
          class stdClass#108 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#109 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#110 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [34] =>
          class stdClass#111 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#112 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#113 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [35] =>
          class stdClass#114 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#115 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#116 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [36] =>
          class stdClass#117 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#118 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#119 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [37] =>
          class stdClass#120 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#121 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#122 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [38] =>
          class stdClass#123 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#124 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#125 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [39] =>
          class stdClass#126 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#127 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#128 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [40] =>
          class stdClass#129 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#130 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#131 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [41] =>
          class stdClass#132 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#133 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#134 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [42] =>
          class stdClass#135 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#136 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#137 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [43] =>
          class stdClass#138 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#139 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#140 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [44] =>
          class stdClass#141 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#142 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#143 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [45] =>
          class stdClass#144 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#145 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#146 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [46] =>
          class stdClass#147 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#148 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#149 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [47] =>
          class stdClass#150 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "GBP"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#151 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#152 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [48] =>
          class stdClass#153 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#154 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#155 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [49] =>
          class stdClass#156 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#157 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#158 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [50] =>
          class stdClass#159 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#160 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#161 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [51] =>
          class stdClass#162 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#163 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#164 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [52] =>
          class stdClass#165 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#166 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#167 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [53] =>
          class stdClass#168 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#169 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#170 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [54] =>
          class stdClass#171 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#172 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#173 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [55] =>
          class stdClass#174 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(1)
            public $ToQty =>
            int(3)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#175 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#176 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [56] =>
          class stdClass#177 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#178 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#179 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [57] =>
          class stdClass#180 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#181 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#182 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [58] =>
          class stdClass#183 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#184 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#185 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [59] =>
          class stdClass#186 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(11) "NEW_PRODUCT"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#187 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#188 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
          [60] =>
          class stdClass#189 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#190 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#191 (2) {
                    public $Name =>
                    string(13) "option name 1"
                    public $Value =>
                    string(13) "option_code_1"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrlXauuZOojh8cww=="
          }
          [61] =>
          class stdClass#192 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#193 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#194 (2) {
                    public $Name =>
                    string(13) "option name 2"
                    public $Value =>
                    string(13) "option_code_2"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrmXauuZOojjccxw=="
          }
          [62] =>
          class stdClass#195 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#196 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#197 (2) {
                    public $Name =>
                    string(13) "option name 3"
                    public $Value =>
                    string(13) "option_code_3"
                  }
                }
              }
            }
            public $Options =>
            string(76) "eJwBLADT/6G10uOW07exk6mNk7KvrpaSc4l1lbXToqi5sriTcbOXseWu3ZGrnXauuZOojk8cyw=="
          }
          [63] =>
          class stdClass#198 (7) {
            public $ProductSKU =>
            string(0) ""
            public $Currency =>
            string(3) "BGN"
            public $FromQty =>
            int(4)
            public $ToQty =>
            int(7)
            public $PurchaseType =>
            string(7) "RENEWAL"
            public $Groups =>
            array(1) {
              [0] =>
              class stdClass#199 (2) {
                public $GroupCode =>
                string(6) "GRUP_1"
                public $Options =>
                array(1) {
                  [0] =>
                  class stdClass#200 (2) {
                    public $Name =>
                    string(4) "NONE"
                    public $Value =>
                    string(4) "NONE"
                  }
                }
              }
            }
            public $Options =>
            string(0) ""
          }
        }
        public $Errors =>
        array(0) {
        }
      }
    }
  }
}

 

Payment failed (offline payment methods)

Overview

Use the variables in the list below to customize the Payment failed (offline payment methods) shopper email according to your needs.

Check the 'Mandatory' column to see the variables that are required in your customized version of the e-mail.

Variable name Description Test value Mandatory

BANKACCOUNT

2Checkout bank account

[NLXXABNAXXXXXXXXXX (IBAN)]

No

BANKIBAN

2Checkout bank IBAN

ABNANL2XXX

No

BANKNAME

2Checkout bank name

 ABN AMRO Bank Amsterdam

No

BANKROUTINGNUMBER

2Checkout bank routing number

0

No

BANKSWIFT

2Checkout bank swift code

ABNANL2XXX

No

BOLETO_SLIP_URL

URL pointing to Boleto slip

0

No

BUSINESS_COMPANY

2Checkout company name

2Checkout

Yes

BUSINESS_HOTLINE

2Checkout support phone

0

No

BUSINESS_HOTLINEUS

2Checkout US hotline number

0

No

BUSINESS_OPEMAIL

2Checkout operational email address

support@avangate.com

No

BUSINESS_SUPEMAIL

2Checkout support email address

support@avangate.com

No

CURRENCY

Order billing currency

USD]

Yes

CURRENCY_ORIGINAL

Original order currency (applicable to refunds)

0

No

ENCRYPTED_MERCHANT_CODE

Encrypted merchant code

0

No

FIRSTNAME

Shopper's first name used on the delivery information

[John

No
GATEWAY_ERROR_CODE Gateway error code

GW_PROCESSING_ERROR

See the full list of Possible Values

No
GATEWAY_ERROR_MESSAGE Reason why the transaction failed. (e.g. Invalid card, insufficient funds) Error processing the card transaction. The card account has not been debited. Card data is invalid or incomplete. No

GENERALTOTAL

Total order price

[56.50

Yes

HAS_RENEWAL_PRODUCTS

Flag that indicates whether at least one product has renewal settings

0

No

HOTLINE_NUMBERS

0

0

No

IS_RENEWAL

Flag that indicates whether at least one product has renewal settings

0

No

LASTNAME

Shopper's last name used on the delivery information

Doe]

No

MYACCOUNT_URL_UPDATE_CC

URL for updating credit card information in myAccount

0

No

MY_ACCOUNT_URL_UPDATE_CC

URL for updating credit card information in myAccount

0

No

NAMES_OF_PRODUCTS

Names of all products in the order, comma-separated

0

No

ORDERDATE

Order placement date

[2011-01-01]

Yes

ORDER_AMOUNT_ORIGINAL

Original order value (applicable to refunds)

0

No

ORDER_DATE_STANDARD_FORMAT

The standard format used for the order placement date

0

No

ORDER_FLOW

Purchase flow used to place the order

0

No

ORDER_STATUS

Order status

0

No

PAYABLE_TO

Payee name (applicable to wire transfer)

0

No

PAYMENT_REFERENCE

Payment reference for wire transfer

0

No

PAYMENT_TYPE_INFO

English payment method name. Includes last four card digits (if applicable).

0

No

PAYTYPE

Identification number for the payment method selected during the ordering process.

0

No

PRODUCTS

0

0

No

PRODUCTS[index1].BILLING_CYCLE

Indicates how many renewals have been successfully performed so far (on the subscription)

11

No
PRODUCTS[index1].CODE Product code. P_CODE No

PRODUCTS[index1].DISCOUNT

Product discount value per product line

[2.00

No

PRODUCTS[index1].INFO

Additional product information defined by the merchant when generating buy links.

[Product info 1]

No

PRODUCTS[index1].LICENSE_TYPE

Type of purchased subscription

0

No

PRODUCTS[index1].PCODE

Product code.

[P_CODE_1]

No

PRODUCTS[index1].PID

Product ID number

1001

No

PRODUCTS[index1].PNAME

Product name

[Test product name 1]

No

PRODUCTS[index1].PRICE

Product unit price

[20.00

No

PRODUCTS[index1].PRODUCT_OPTIONS[index2]

0

0

No

PRODUCTS[index1].PRODUCT_OPTIONS[index2].OptionText

Ignore internal var.

0

No

PRODUCTS[index1].PROMONAME

Name of the promotion applied to the product

[Some promotion]

No

PRODUCTS[index1].QUANTITY

Purchased product quantity

[2]

No

PRODUCTS[index1].SHORT_DESCRIPTION

Short product description

0

No
PRODUCTS[index1].SKU Product SKU SKU1234 No

PRODUCTS[index1].TOTAL

Total gross price per product line (before applying discounts)

[45.60

No

PRODUCTS[index1].VAT

VAT/Sales tax value per product line

[3.80

No

PRODUCTS_DATA[index1].IdProduct

Product ID number

0

No

PRODUCTS_DATA[index1].PRODUCT_SHORT_DESCRIPTION

Short product description

0

No

PRODUCTS_NO

Number of products in the cart.

0

No

QR_CODE_SRC

The QR code URL to be used for payments with bank/wire transfer

0

No

REFNO

Order reference number

[9xxxxx]

Yes

RETRYLINK

Payment retry link

https://secure.avangate.com/

No

RETRY_LINK

Payment retry link

0

No

SELLERCOMPANY

Merchant's company name

[Software Company Name]

No

TOTALEQUIV

The order amount converted to all the merchant's currencies

0

No

UNSUBSCRIBE_LINK

Shopper unsubscribe link

0

No

UPLOADLINK

File upload link

0

No

UPLOAD_LINK

File upload link

0

No

WEBSITE

Website where the shopper placed the order

http://www.software-company-website.com

Yes

Retrieve product by code

Overview

Use getProductByCode to extract product information using the unique identifier you assign to subscription plans/products.  

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

ProductCode

String

 

The product code that you control.

Request Example

<?php

require ('PATH_TO_AUTH');

$ProductCode = "subscr1";

try {
    $ProdbyCode = $client->getProductByCode($sessionID, $ProductCode);
}

catch (SoapFault $e) {
    echo "ProductInfo: " . $e->getMessage();
    exit;
}

var_dump("ProductInfo", $ProdbyCode);


?>

Response Parameters

Parameters Type/Description
Product Object

 

Customer

Attributes

Parameters

Type/Description

CustomerDetails

Object

 

AvangateCustomerReference

Optional (Int)

 

 

System-generated Avangate customer reference.

 

null when you create a new customer. The Avangate system generates default customer numerical (integer) IDs (AV_CUSTOMERID) automatically for all orders containing products that feature subscriptions.

 

 

Aggregate subscriptions under the same Customer account by adding the AV_CUSTOMERID (case sensitive) parameter to Buy links.

 

ExternalCustomerReference

Optional (string)

 

 

Unique customer alphanumeric (string) identifiers you control. Aggregate subscriptions under the same Customer account by adding the CUSTOMERID (case sensitive) parameter to Buy links.

 

FirstName

Required (string)

 

 

Customer's first name. 

 

LastName

Required (string)

 

 

Customer's last name.

 

Company

Optional (string)

 

 

Company name.

 

FiscalCode

Optional (string)

 

 

Can be null for end users. For companies, it needs to be the VAT ID, which Avangate validates.

Avangate throws an error if the VAT ID is invalid/incorrect. When present, you also need to provide the company name.

 

Can be null for end users.

 

Address1

Required (string)

 

 

Customer's address.

 

Address2

Optional (string)

 

 

Customer's address.

 

City

Required (string)

 

 

Customer's city.

 

State

Optional (string)

 

 

Customer's state. For example, "Alabama","Alaska","Arizona".

 

Zip

Required (string)

 

 

Zip code.

 

CountryCode

Required (string)

 

 

Customer's country code (ISO 3166 two-letter code).

 

Phone

Optional (string)

 

 

Customer's phone number.

 

Fax

Optional (string)

 

 

Customer's fax number.

 

Email

Required (string)

 

 

Customer's email.

 

ExistingCards

Optional (Array of objects)

 

 

 

 

 

TransientToken

Optional (Object)

 

 

 

Populated only with when you retrieve customer information by SSOToken.

 

 

 

Token

Optional (string)

 

 

 

 

Token for the EXISTING_PAYMENT_DATA flow. Use it to charge customers using cards they used in the past for purchases from your Avangate account.

 

 

CardType

Optional (string)

 

 

 

visa, visaelectron, mastercard, maestro, amex, discover, dankort, cartebleue, jcb, elo, hipercard

 

 

LastDigits

Optional (string)

 

 

 

Last four digits of the credit card.

 

 

ExpirationMonth

Optional (string)

 

 

 

Card expiration month.

 

 

ExpirationYear

Optional (string)

 

 

 

Card expiration year.

 

 

NameOnCard

Optional (string)

 

 

 

Card holder name.

 

Enabled

Optional (boolean)

 

 

true or false, depending on whether the customer account is active or inactive. An active customer account features at least one Active or Past due subscription. Possible customer statuses:

 

  • Active - Customer account status is Active even if Trial and Cancelled/Expired subscriptions exist for the customer, along as there's at least one Active subscription. Customers with a single subscription featuring the Past due status (expired but in the grace period) are considered Active.
  • Inactive - All subscriptions associated to this Customer account are cancelled, expired or both.
  • Trial - Customer account status is Trial if all Active subscriptions for this customer are trials, regardless of any Cancelled/Expired subscriptions.

 

Trial

Optional (boolean)

 

 

true or false, depending on whether the customer account features only trials or also paid subscriptions.

 

Language

Optional (string)

 

 

ISO 639-1 two-letter code. Example: “en.”

 

Retrieve usage

Overview

Use the getSubscriptionUsages method via JSON-RPC API 6.0 to search through subscription usages and retrieve all the usage information attached to a subscription.

Request Parameters

Parameters Type Required/Optional Description
merchantCode String Required The system-generated merchant ID.
hash String Required The MD5 hmac key for the request.
sessionID String Required The system-generated code of the session.
SubscriptionReference String Required The system-generated reference code of the subscription.
Page Number Required The page to be returned.
Limit Number Required The number of results per page.
IntervalStart Datetime Required Filters all usages where UsageEnd >= IntervalStart. Format "YYYY-MM-DD". The timezone used is the one on the server.
IntervalEnd Datetime Required Filters all usages where UsageEnd <= IntervalEnd. Format "YYYY-MM-DD". The timezone used is the one on the server.
OptionCode String Optional Unique 2Checkout option code. The pay-per-usage price options group for which the usage is uploaded. Example: metered pricing. 
RenewalOrderReference Number Optional The renewal order unique identifier.

Request Sample

<?php
require ('PATH_TO_AUTH'); // authentication call
$SubscriptionReference = 'B7D8E72224';
$jsonRpcRequest = array(
    'jsonrpc' => '2.0',
    'method'  => 'getSubscriptionUsages',
    'params'  =>
        array(
            $sessionID,
            [
                'SubscriptionReference' => $SubscriptionReference,
                "Page"                  => 1,
                "Limit"                 => 10,
                "IntervalStart"         => "2020-07-01 10:40:00",
                "IntervalEnd"           => "2020-08-01 10:40:00",
                "RenewalOrderReference" => "11749701"
            ]
        ),
    'id'      => $i++
);
var_dump ("getSubscriptionUsages", callRPC((Object)$jsonRpcRequest, $host));

Response

The getUsages method via JSON-RPC APIv6 returns the Usage object when successful.

class stdClass#4 (2) {
      public $Items =>
      array(1) {
        [0] =>
        class stdClass#3 (8) {
          public $UsageReference =>
          string(12) "120011114371"
          public $SubscriptionReference =>
          string(10) "67F3AD6A32"
          public $OptionCode =>
          string(6) "USG_MN"
          public $UsageStart =>
          string(19) "2020-07-06 12:00:00"
          public $UsageEnd =>
          string(19) "2020-07-07 12:00:00"
          public $Units =>
          int(7)
          public $Description =>
          string(15) "Response sample"
          public $RenewalOrderReference =>
          int(0)
        }
      }
      public $Pagination =>
      class stdClass#5 (3) {
        public $Page =>
        int(1)
        public $Limit =>
        int(10)
        public $Count =>
        int(1)
      }
    }

Error Handling

The below errors are returned when the getUsages method via JSON-RPC APIv6 is unsuccessful.

Error message description Error code Error message

 

 

 

 

 

 

 

 

 

 

 

The provided parameters lack the required type or format.

SEARCH_PAGE_INVALID The Page parameter must be a positive integer higher than or equal to 1.
SEARCH_LIMIT_INVALID The Limit parameter must be a positive integer lower than 100.
MANDATORY_FIELDS_MISSING Both 'IntervalStart' and 'IntervalEnd' parameters must be provided.
FILTER_INVALID If provided, 'RenewalOrderReference' must be a positive integer.
FILTER_INVALID 'IntervalStart' must be provided in the following format: YYYY-MM-DD HH:MM:SS.
FILTER_INVALID 'IntervalStart' must be provided in the following format: YYYY-MM-DD HH:MM:SS.
FILTER_INVALID 'IntervalEnd' must be provided in the following format: YYYY-MM-DD HH:MM:SS.
FILTER_INVALID 'IntervalEnd' must be provided in the following format: YYYY-MM-DD HH:MM:SS.
SEARCH_PAGE_INVALID 'The Page parameter must be a positive integer higher than or equal to 1.
SUBSCRIPTION_NOT_FOUND Subscription not found.
Unexpected error happens INTERNAL_ERROR <unexpected_error>

 

Update a lead

Overview

Use the updateLead method to update an existing lead and change all current values with new data.

Request Parameters

Parameters Required Type/Description
Currency Required Order currency.
Items Required Purchased products.
BillingDetails Required Array of strings. Billing information for the order.
DeliveryDetails Required Array of strings. Delivery information for the order.

Request Example

<?php

require ('PATH_TO_AUTH');

$Lead = new stdClass();

$Lead->CartId = "CartIdValue";
$Lead->Currency = "EUR";
$Lead->Language = "BG";
$Lead->ExternalReference = "REST_API_3CHECKOUT";
$Lead->Source = "testAPI.com";
$Lead->CustomerReference = "asdf1";
$Lead->MachineId = "123asd";

$Lead->Items = [];

$Item = new stdClass();
$Item->Code = "04C26C50F8";
$Item->Quantity = 2;
$Item->IsDynamic = false;
$Item->Tangible = true;
$Item->PurchaseType = "PRODUCT";
$Item->PriceOptions = [];

$priceOption = new stdClass();
$priceOption->Name = "group name 1";
$priceOption->Required = false;
$option = new stdClass();
$option->Name = 'add25';
$option->Value = 'add25';
$option->Surcharge = 100;
$priceOption->Options[] = $option;

$Item->PriceOptions[] = $priceOption;

$recurringOptions = new stdClass();
$recurringOptions->CycleLength = 6;
$recurringOptions->CycleUnit = 'MONTH';
$recurringOptions->CycleAmount = 100;
$recurringOptions->ContractLength = 2;
$recurringOptions->ContractUnit = 'YEAR';
$Item->RecurringOptions = $recurringOptions;

$marketingCampaigns = new stdClass();
$marketingCampaigns->Type = 23;
$marketingCampaigns->ParentCode = "m";
$marketingCampaigns->CampaignCode = 23;
$Item->MarketingCampaigns = $marketingCampaigns;

$Item->Price = new stdClass();
$Item->Price->Amount = 20;
$Item->Price->Type = "CUSTOM";

$additionalFields = [];

$additionalField = new stdClass();
$additionalField->Code = "TestFieldOne";
$additionalField->Text = "test text";
$additionalField->Value = "test value";
$additionalFields[] = $additionalField;
$Item->AdditionalFields = $additionalFields;

$Item->SubscriptionStartDate = date("Y-m-d H:i:s");

$Lead->Items[] = $Item;

$billingDetails = new stdClass();
$billingDetails->FirstName = "Customer";
$billingDetails->LastName = "2Checkout";
$billingDetails->Phone = null;
$billingDetails->Company = null;
$billingDetails->FiscalCode = "32423423";
$billingDetails->Email = "customer@2checkout.com";
$billingDetails->Address1 = "Test Address";
$billingDetails->Address2 = null;
$billingDetails->City = "LA";
$billingDetails->Zip = "12345";
$billingDetails->CountryCode = "RO";
$billingDetails->State = "CA";

$Lead->BillingDetails = $billingDetails;
$Lead->DeliveryDetails = clone($billingDetails);

$Lead->DeliveryInformation = new stdClass();
$Lead->DeliveryInformation->ShippingMethod = new stdClass();
$Lead->DeliveryInformation->ShippingMethod->Code = "sdfsd";

$Lead->PaymentDetails = new stdClass();
$Lead->PaymentDetails->Type = "CC";
$Lead->PaymentDetails->Currency = "EUR";
$Lead->PaymentDetails->PaymentMethod = new stdClass();
$Lead->PaymentDetails->PaymentMethod->RecurringEnabled = false;
$Lead->PaymentDetails->PaymentMethod->CardPayment = new stdClass();
$Lead->PaymentDetails->PaymentMethod->CardPayment->InstallmentsNumber = 23;
$Lead->PaymentDetails->CustomerIP = "1.2.3.4";

$Lead->LocalTime = date("Y-m-d H:i:s");

try {
    $leadData = $client->updateLead($sessionID, $Lead);
} catch (SoapFault $e) {
    echo "updateLead: " . $e->getMessage();
    exit;
}

var_dump("updateLead", $leadData);

Response Example

class stdClass#18 (4) {
  public $LeadCode =>
  string(10) "60E6C4B574"
  public $CreatedAt =>
  string(19) "2019-11-05T16:39:36"
  public $UpdatedAt =>
  string(19) "2019-11-05T16:48:31"
  public $Errors =>
  array(0) {
  }
}

 

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo