Documentation

sale.paysystem.add

Description

sale.paysystem.add(
 fields
)

The method adds payment system.

Parameters:

Method Description Available from version
fiedls Set of fields (array type array("field":"value"[, ...])), containing values, describing payment system. Available fields:
  • NAME - System name
  • DESCRIPTION - payment system description.
  • PERSON_TYPE_ID - payer type ID
  • XML_ID - Symbolic code.
  • PERSON_TYPE_ID - payer type ID.
  • BX_REST_HANDLER - Handler code in the system
  • ACTIVE - payment system active state flag
  • ENTITY_REGISTRY_TYPE - binding of payment system (value for a store: ORDER; value for invoices crm: CRM_INVOICE)
  • LOGOTYPE - Payment system logo (image in format Base64 Base64 — binary data encoding standard using 64 ASCII characters. Encoding character set includes numerical-text Latin characters A-Z, a-z and 0-9 (62 characters) and 2 additional characters depending on implementation system. Each 3 original bytes are encoded by 4 characters (increase by ¹⁄₃).

    Learn more...
    ). This field is available starting from version 20.0.550
  • NEW_WINDOW - Field, responsible for configuring "Open in new window" (default value - N). Available from version 20.100.0

Example

BX24.callMethod(
	"sale.paysystem.add",
	{
		'NAME' : 'Payment system with REST', 					// Payment system name
		'PERSON_TYPE_ID' : 1, 								// Payer type ID
		'ACTIVE' : 'Y',											// Payment system active state flag
		'BX_REST_HANDLER' : 'resthandlercode', 					// Handler code in the system
		'SETTINGS' : { 										// Handlers settings for this payment system
			'REST_SHOP_ID' : {								// Parameter code
				'TYPE' : 'VALUE',								// Value type
				'VALUE' : '111111111'							// Value
			},
			'REST_SCID' : {
				'TYPE' : 'VALUE',
				'VALUE' : '2222222'
			}
		}
	},
	function(result)
	{
		if(result.error())
			console.error(result.error());
		else
			console.info("Payment system is added with ID " + result.data());
	}
);

Possible values

TYPE possible values
ORDER Parameters
PROPERTY Invoice properties
PAYMENT Payment
USER User
VALUE String type value
INPUT Checkbox

VALUE possible values
ORDER ID: ID,
ACCOUNT_NUMBER: Order number,
ORDER_TOPIC: Topic,
DATE_INSERT: Order date,
DATE_INSERT_DATE: Order date (without time),
DATE_BILL: Data and time of issue,
DATE_BILL_DATE: Date of issue,
DATE_PAY_BEFORE: Payment date,
SHOULD_PAY: Invoice sum,
CURRENCY: Currency,
PRICE: Order price,
PRICE_DELIVERY: Delivery price,
DISCOUNT_VALUE: Discount value,
USER_ID: Buyer code,
PAY_SYSTEM_ID: Payment system code,
DELIVERY_ID: Delivery service code,
TAX_VALUE: Tax,
USER_DESCRIPTION: Comment
PAYMENT ID: ID
ACCOUNT_NUMBER: Payment number,
DATE_BILL: Data and time of issue,
DATE_BILL_DATE: Date of issue (without time),
SUM: Invoice sum,
CURRENCY: Currency,
USER ID: Buyer code,
LOGIN: Login,
NAME: Name,
SECOND_NAME: Second name,
LAST_NAME: Last name,
EMAIL: EMail,
PERSONAL_PROFESSION: Professional occupation,
PERSONAL_WWW: Personal website,
PERSONAL_ICQ: ICQ number,
PERSONAL_GENDER: Gender ,
PERSONAL_FAX: Fax number,
PERSONAL_MOBILE: Phone number,
PERSONAL_STREET: Address,
PERSONAL_MAILBOX: Mailbox,
PERSONAL_CITY: City,
PERSONAL_STATE: State,
PERSONAL_ZIP: Zip code,
PERSONAL_COUNTRY: Country,
WORK_COMPANY: Company,
WORK_DEPARTMENT: Department,
WORK_POSITION: Position,
WORK_WWW: Company site,
WORK_PHONE: Work phone,
WORK_FAX: Work fax,
WORK_STREET: Company address,
WORK_MAILBOX: Work mailbox,
WORK_CITY: Company city,
WORK_STATE: Company state,
WORK_ZIP: Company zip code,
WORK_COUNTRY: Company country



© «Bitrix24», 2001-2024
Up