-
Notifications
You must be signed in to change notification settings - Fork 27
/
BankSelection.php
45 lines (36 loc) · 1.22 KB
/
BankSelection.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace Tpay\Example;
use Tpay\OriginApi\PaymentForms\PaymentBasicForms;
include_once 'config.php';
include_once 'loader.php';
final class BankSelectionExample extends PaymentBasicForms
{
public function __construct()
{
$this->merchantSecret = 'demo';
$this->merchantId = 1010;
parent::__construct();
}
/** Get bank selection by sending data array */
public function getBankForm()
{
$config = [
'amount' => 999.99,
'description' => 'Transaction description',
'crc' => '100020003000',
'result_url' => 'http://example.pl/examples/notificationBasic.php?transaction_confirmation',
'result_email' => 'shop@example.com',
'return_url' => 'http://example.pl/examples/success.html',
'email' => 'customer@example.com',
'name' => 'John Doe',
];
$form = $this->getBankSelectionForm($config, false, true, null, true);
echo $form;
}
/** Get simple banks list presented as tiles without any other elements */
public function getSimpleBanksForm()
{
echo $this->getSimpleBankList(false, false);
}
}
(new BankSelectionExample())->getBankForm();