forked from tpay-com/tpay-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasicPaymentForm.php
46 lines (35 loc) · 1.02 KB
/
BasicPaymentForm.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
46
<?php
/*
* Created by tpay.com
*/
namespace tpayLibs\examples;
use tpayLibs\src\_class_tpay\PaymentForms\PaymentBasicForms;
include_once 'config.php';
include_once 'loader.php';
class TpayBasicExample extends PaymentBasicForms
{
public function __construct()
{
$this->merchantSecret = 'demo';
$this->merchantId = 1010;
parent::__construct();
}
public function getDataForTpay()
{
$config = array(
'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' => '[email protected]',
'email' => '[email protected]',
'name' => 'John Doe',
);
/*
* This method return HTML form
*/
echo $this->getTransactionForm($config);
}
}
(new TpayBasicExample())->getDataForTpay();