Standard templates
Standard templates are used to connect the default basic payment interface. Two options are available: InPay and eWallet. They are connected by calling the corresponding functions of the Payture.js library.
InPay interface
To use the InPay template with default parameters, call:
$ph.ready(function() {
Payture.InPay({
use_3ds2: {use_3ds2},
use_3ds2_preauth: {use_3ds2_preauth}
});
});eWallet interface
To use the eWallet template with default parameters, use the following function:
$ph.ready(function() {
Payture.eWalletPay({
use_3ds2: {use_3ds2},
use_3ds2_preauth: {use_3ds2_preauth}
});
});Configuration parameters
In addition to the basic parameters, the templates support extensive customization of the interface, texts, errors, external elements, payment methods, and button behavior.
The available parameters and values are listed below:
| Parameter | Default value | Description |
|---|---|---|
Language | RU | Template language: RU / EN |
CardHolder | Customer | By default, the field is hidden and Payture is passed. If the field is added to the template (via the CardHolderBlock parameter), leave this parameter empty |
LogoUrl | — | Path to a custom logo |
The VisibilitySettings block is a group of parameters that controls the display of individual interface elements. It lets you show and hide fields, buttons, and blocks. The available parameters are listed below.
| Parameter | Default value | Description |
|---|---|---|
EMailBlock | false | Email input field |
CardHolderBlock | false | Cardholder name input field |
HeaderBlock | true | Visibility of the block with the Payture logo |
FootnoteVisibility | true | Visibility of the copyright line in the footer |
PaytureConditions | true | Visibility of the terms line in the footer: "By clicking Pay, you agree to the terms of use of the service" |
ProviderName | true | Visibility of the line with the provider name Payture next to the logo |
ProviderDescription | true | Visibility of the line with the provider description Payment gateway next to the logo |
Example of a call with configuration parameters:
$ph.ready(function() {
Payture.InPay({
Language: 'RU',
CardHolder: 'Customer',
LogoUrl: '',
VisibilitySettings: {
EMailBlock: true,
CardHolderBlock: false,
HeaderBlock: true,
FootnoteVisibility: true,
PaytureConditions: true
}
});
});