-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathBasicPaymentForm.php
More file actions
37 lines (30 loc) · 973 Bytes
/
BasicPaymentForm.php
File metadata and controls
37 lines (30 loc) · 973 Bytes
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
<?php
namespace Tpay\Example;
use Tpay\OriginApi\PaymentForms\PaymentBasicForms;
include_once 'config.php';
include_once 'loader.php';
final class TpayBasicExample extends PaymentBasicForms
{
public function __construct()
{
$this->merchantSecret = 'demo';
$this->merchantId = 1010;
parent::__construct();
}
public function getDataForTpay()
{
$config = [
'amount' => 999.99,
'description' => 'Transaction description',
'crc' => '100020003000',
'return_url' => 'https://www.tpay.com',
'result_url' => 'http://example.pl/examples/paymentBasic.php?transaction_confirmation',
'result_email' => 'shop@example.com',
'email' => 'customer@example.com',
'name' => 'John Doe',
];
// This method return HTML form
echo $this->getTransactionForm($config);
}
}
(new TpayBasicExample())->getDataForTpay();