Советы / рекомендации

Платежный виджет Liqpay

$liqpay = new LiqPay($public_key, $private_key);
$html = $liqpay->cnb_form(array(
'action'         => 'pay',
'amount'         => '1',
'currency'       => 'USD',
'description'    => 'description text',
'order_id'       => 'order_id_1',
'version'        => '3'
));

Payment with splitting the amount to several recipients. This parameter specifies a JSON array with payment splitting rules. When using the split_rules parameter, there is one debit from the client and several credits to the recipients. The acquiring fee is charged to each store in the split_rules array . Example JSON string 

[
  {
    "public_key": "i000000001",
    "amount": 1,
    "commission_payer": "sender",
    "server_url": "https://server1/callback"
  },
  {
    "public_key": "i000000002",
    "amount": 2,
    "commission_payer": "receiver",
    "server_url": "https://server2/callback"
  }
]
Sender settings
sender_address NEWOptionalStringSender’s address
sender_cityOptionalStringSender’s city
sender_country_codeOptionalStringCountry code of the sender. Digital ISO 3166-1 code
sender_first_nameOptionalStringName of the sender
sender_last_nameOptionalStringSender’s last name
sender_postal_codeOptionalStringPostal code of the sender
Secure payment options
letter_of_creditOptionalStringTo enable the acceptance of payments by letter of credit, pass the parameter with the value 1
letter_of_credit_dateOptionalStringLetter of credit expiration date in the following format : 2015-03-31 00:00:00 UTC .
Regular payment options
subscribeOptionalStringRegular payment. Possible values 1
subscribe_date_startOptionalStringDate of first payment. The time must be specified in the following format : 2015-03-31 00:00:00 UTC . If an expired date is specified, the subscription will be activated from the current date of receipt of the request
subscribe_periodicityOptionalStringPeriodicity of withdrawal of funds. Possible values :
month — once a month year — once a year
Options for payment in 1 click
customerOptionalStringThe unique identifier of the client on the merchant’s website. When transferring the parameter, LiqPay remembers the client’s payment details and his identifier — further payment can be made in 1 click. The maximum length is 100 characters . ( When using the parameter for <b>Masterpass 1 click</b>, the valid phone number of the payer is transferred in this field )
recurringbytokenOptionalStringAllows you to generate the payer’s card_token , which you will receive in the callback request to server_url . card_token allows you to make payments without entering the details of the payer’s card, using the token payment API — that is, in 1 click. To receive a card_token , you must pass the following values ​​in the request : 1
customer_user_idOptionalStringUser ID in the merchant system, transmitted at each user payment (must not match customer , used for payment using the <b>Masterpass 1 click</b> wallet )
Other parameters
daeOptionalStringLong entry Detail Addenda .
The dae parameter is a JSON string to which the base64 function has been applied . JSON can contain the following parameters :
 
{
  "airLine": "Avia", // абревіатура авіакомпанії, max 4 символів.
  "ticketNumber": "ACSFD12354SA", // номер квитка, max 15 символів. 
  "passengerName": "John Doe", // ім'я пасажира, max 29 символів.
  "flightNumber": "742", // номер рейсу, max 5 цифр.
  "originCity": "DP", // код міста/аеропорту вильоту, max 5 символів.
  "destinationCity": "NY", // код міста/аеропорту призначення, max 5 символів.
  "departureDate": "100514" // дата вильоту в форматі YYMMDD, max 6 цифр.
}

Добавить комментарий

Ваш адрес email не будет опубликован.

2 + двадцать =