forked from zerosdev/linkqu-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.php
119 lines (102 loc) · 3.81 KB
/
example.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
require './vendor/autoload.php';
use ZerosDev\LinkQu\Constant;
use ZerosDev\LinkQu\Client;
$linkqu = new Client(function ($client) {
$client->setMode(Constant::DEVELOPMENT)
->setClientId('testing')
->setClientSecret('123')
->setUsername('LI307GXIN')
->setPin('2K2NPCBBNNTovgB')
->setDebug(true);
});
$partnerRef = '54321';
// $admin = $linkqu->administration();
// print_r($admin->banks());
// print_r($admin->emoney());
// print_r($admin->resumeAccount());
// $report = $linkqu->report();
// print_r($report->status($partnerRef));
// print_r($report->reports('2020-02-10', '2020-02-13'));
// $trx = $linkqu->transaction();
// print_r($trx->createVa(function($trx) {
// $trx->setAmount(10000)
// ->setExpired(60)
// ->setCustomerId(uniqid())
// ->setPartnerRef(time())
// ->setCustomerName('Nama Pelanggan')
// ->setCustomerPhone('08123456789')
// ->setCustomerEmail('email@customer.com')
// ->setBankCode('014');
// }));
// print_r($trx->createVaPermata(function($trx) {
// $trx->setAmount(10000)
// ->setExpired(60)
// ->setCustomerId(uniqid())
// ->setPartnerRef(time())
// ->setCustomerName('Nama Pelanggan')
// ->setCustomerPhone('08123456789')
// ->setCustomerEmail('email@customer.com');
// }));
// print_r($trx->createDedicatedVa(function($trx) {
// $trx->setCustomerId(uniqid())
// ->setCustomerName('Nama Pelanggan')
// ->setCustomerPhone('08123456789')
// ->setCustomerEmail('email@customer.com')
// ->setPartnerRef(time())
// ->setBankCode('013');
// }));
// print_r($trx->updateDedicatedVa(function($trx) {
// $trx->setCustomerId('613a039e63741')
// ->setCustomerName('Nama Pelanggan 2')
// ->setCustomerPhone('081234567890')
// ->setCustomerEmail('email@customer2.com')
// ->setPartnerRef(time())
// ->setBankCode('013');
// }));
// print_r($trx->createRetail(function($trx) {
// $trx->setAmount(10000)
// ->setExpired(60)
// ->setCustomerId(uniqid())
// ->setPartnerRef(time())
// ->setCustomerName('Nama Pelanggan')
// ->setCustomerPhone('08123456789')
// ->setCustomerEmail('email@customer.com')
// ->setRetailCode('ALFAMART');
// }));
// print_r($trx->createQris(function($trx) {
// $trx->setAmount(10000)
// ->setExpired(60)
// ->setCustomerId(uniqid())
// ->setPartnerRef(time())
// ->setCustomerName('Nama Pelanggan')
// ->setCustomerPhone('08123456789')
// ->setCustomerEmail('email@customer.com');
// }));
// print_r($trx->createOvoPush(function($trx) {
// $trx->setAmount(10000)
// ->setExpired(60)
// ->setCustomerId(uniqid())
// ->setPartnerRef(time())
// ->setCustomerName('Nama Pelanggan')
// ->setCustomerPhone('08123456789')
// ->setCustomerEmail('email@customer.com')
// ->setEwalletPhone('081234567890')
// ->setBillTitle('Tagihan Belanja')
// ->setItem('Nama Item 1', 10000, 'https://google.com/image1.jpg')
// ->setItem('Nama Item 2', 20000, 'https://google.com/image2.jpg');
// }));
// print_r($trx->createPaymentEwallet(function($trx) {
// $trx->setAmount(10000)
// ->setExpired(60)
// ->setCustomerId(uniqid())
// ->setPartnerRef(time())
// ->setCustomerName('Nama Pelanggan')
// ->setCustomerPhone('08123456789')
// ->setCustomerEmail('email@customer.com')
// ->setRetailCode('PAYDANA')
// ->setEwalletPhone('081234567890')
// ->setBillTitle('Tagihan Belanja')
// ->setItem('Nama Item 1', 10000, 'https://google.com/image1.jpg')
// ->setItem('Nama Item 2', 20000, 'https://google.com/image2.jpg');
// }));