Skip to content

Commit

Permalink
Merge pull request #10 from alrotech/feature/card_erip_tabs_order
Browse files Browse the repository at this point in the history
New special option with defined tabs order on the payment page
  • Loading branch information
Ivan Klimchuk authored Feb 5, 2023
2 parents 2b33b4e + 666b541 commit cc58ee3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions _build/data/transport.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ConfigurablePaymentHandler {}
WebPay::OPTION_CONFIRMATION_MODE=> ['xtype' => 'combo-boolean', 'value' => false],
WebPay::OPTION_CHECKOUT_URL_TEST=> ['xtype' => 'textfield', 'value' => 'https://securesandbox.webpay.by'],
WebPay::OPTION_GATE_URL_TEST => ['xtype' => 'textfield', 'value' => 'https://sandbox.webpay.by'],
WebPay::OPTION_TAB => ['xtype' => 'textfield', 'value' => ''],
];

$settings = [];
Expand Down
6 changes: 4 additions & 2 deletions core/components/mspwebpay/WebPay.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class WebPay extends ConfigurablePaymentHandler
public const OPTION_LANGUAGE = 'language';
public const OPTION_VERSION = 'version';
public const OPTION_CURRENCY = 'currency';
public const OPTION_TAB = 'tab';

public const OPTION_DEVELOPER_MODE = 'developer_mode';
public const OPTION_CONFIRMATION_MODE = 'confirmation_mode';
Expand Down Expand Up @@ -146,8 +147,9 @@ public function getPaymentLink(msOrder $order)
'wsb_cancel_return_url' => $this->config['return_url'] . '?action=cancel',
'wsb_notify_url' => $this->config['return_url'] . '?action=notify',
'wsb_shipping_name' => $delivery->get('name'),
'wsb_shipping_price' => $order->get('delivery_cost'),
'wsb_email' => $user->get('email')
'wsb_shipping_price' => $delivery->get('price'),
'wsb_email' => $user->get('email'),
'wsb_tab' => $this->config[self::OPTION_TAB],
];

$products = $this->modx->getCollection(msOrderProduct::class, ['order_id' => $order->get('id')]);
Expand Down

0 comments on commit cc58ee3

Please sign in to comment.