PlaceOrderAndAuthorize_API

Description

Parameters

Passed

Returned

The method performs the following actions:

  • Creates a new account
  • Creates a staff member for the account
  • Registers a payment method
  • Places an order for a specified service plan
  • Places an order for an existing account
  • Creates a payment for the order
  • Creates a payment for the order with a registered payment method
  • Specifies domain name servers outside CloudBlue Commerce for a domain subscription in CloudBlue Commerce

The main purpose of this method is to provide a single-point functionality for Billing online store.

 

 

Depends on order structure

Important: Some of parameters are mandatory.

N (depends on request)

Notes:

1. The methods CreateAccountAndPlaceOrder_API and PlaceOrderForAccount_API from previous Billing versions can still be used. Their definitions are the same as the definition of PlaceOrderAndAuthorize_API.

2. PlaceOrderAndAuthorize_API does not have a built-in validator for provisioning parameters passed.

You can use the PlanParamsGetAndValidate_API method to validate service template (ST) service parameters before passing them to PlaceOrderAndAuthorize_API.

3. For order placement purposes, it may be necessary to pass the Terms and Conditions ID, to accept it and proceed with order placement. The additional data slot for Terms and Conditions should be added to the method call. How to do this is shown in the Example 1 section.

Syntax

Copy
ItemResult BM::PlaceOrderAndAuthorize_API(
  Int VendorAccountID;
  Int ProvisioningItemsCounter;
    Str ProvisioningItem_1;
    ...
           Str ProvisioningItem_N;
      Int ProvisioningDataSlotCounter;
        { 
                     Int ProvisioningItemID_1;
          Int ProvisioningParametersCounter;
             {
                                   Str ProvisioningParameter_1;
                    ...
             Str ProvisioningParameter_N;
             }
        ...
        Int ProvisioningItemID_N;
          Int ProvisioningParametersCounter;
             {
                          Str ProvisioningParameter_1;
                    ...
             Str ProvisioningParameter_N;
             }
        }
  Int ContactDataCounter;
      {
      Str ContactDataSlot_1;
      ...
      Str ContactDataSlot_N;
      }
  Int PayToolCounter;
      {
      Str PayToolSlot_1;
      ...
      Str PayToolSlot_N;
      }
  Int AdditionalContactsDataCounter;
      {
      Int AdditionalContactID_1.
          {
          Int NumberOfParametersInContact;
          Str ContactInfoSlot_1;
          ...
          Str ContactInfoSlot_N;
          }
      ...
      Int AdditionalContactID_N;
          {
          Int NumberOfParametersInContact;
          Str ContactInfoSlot_1;
          ...
          Str ContactInfoSlot_N.
          } 
      }
        Int NumberOfParamsInOrderAttributesDataSlot;
           {
      Str OrderAttributesDataSlot_1;
      ...
      Str OrderAttributesDataSlot_N;
      }
        Int NumberOfParamsInTermsAndConditionsDataSlot;
           {
      Int TermsAndConditionsDataSlot_1;
      ...
      Int TermsAndConditionsDataSlot_N;
      }
)

returns

Copy
Int AccountID – ID of newly created customer's account;
Int OrderID – ID of newly created sales order (do not mix with order number);
Str(64) Login – login to Control Panel for the newly created customer (if it was not created the default user login is returned);
Str(40) CreationTimeStr – order creation time;
Int DocID – null;
Double Total - order total sum with discount applied, including taxes;
Double TaxTotal – total of taxes;
Double DiscTotal – total of discount applied to the order;
Double MerchTotal - order total sum with discount applied, minus taxes;
Str(4096) Descr – order description;
Str(10) OrderNbr – order number;
Str PostMethod  – method used for external redirect payment query (POST or GET);
Str(1024) RedirectURL – URL to processing center where the order can be paid (empty for all but external redirect payments), the URL to processing center in case of POST or part of URL before '?' sign in case of GET;
Int RedirectDataCounter – number of N pairs (parameter and value) to be passed to processing center;
    Str RedirectParameterName_1; 
            Str RedirectParameterValue_1;
         ...
    Str RedirectParameterName_N;
            Str RedirectParameterValue_N.

Special Notes:

Special notes are presented in the following subsections. Information is divided by type of method data slots: provisioning items, provisioning parameters, contact data, pay tool data, additional contacts data and order attributes. Each section contains examples. Examples can be used to construct method calls for different purposes.

The whole method call examples are presented in the following subsections:

Example 1: Creating an account with a payment method and placing an order on domain registration to an existing subscription.

Example 2: Creating an account and placing an order for services and domain registration.

Example 3: Placing an order for an existing customer account on services and an additional resource. The customer has a registered credit card.

The example of method response is presented in the Example 3 sub-section as it the same for all requests.

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.