-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_3DS_payment.php
51 lines (46 loc) · 1.33 KB
/
init_3DS_payment.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
<?php
require_once('config/sample_config.php');
use Tokenpay\Model\Currency;
use Tokenpay\Model\PaymentGroup;
$request = array(
'price' => 100,
'paidPrice' => 100,
'walletPrice' => 0,
'installment' => 1,
'currency' => Currency::TL,
'paymentGroup' => PaymentGroup::PRODUCT,
'conversationId' => '456d1297-908e-4bd6-a13b-4be31a6e47d5',
'callbackUrl' => 'https://www.your-website.com/tokenpay-3DSecure-callback',
'card' => array(
'cardHolderName' => 'Haluk Demir',
'cardNumber' => '5258640000000001',
'expireYear' => '2044',
'expireMonth' => '07',
'cvc' => '000'
),
'items' => array(
array(
'externalId' => uniqid(),
'name' => 'Item 1',
'price' => 30,
'subMerchantId' => 1,
'subMerchantPrice' => 27
),
array(
'externalId' => uniqid(),
'name' => 'Item 2',
'price' => 50,
'subMerchantId' => 2,
'subMerchantPrice' => 42
),
array(
'externalId' => uniqid(),
'name' => 'Item 3',
'price' => 20,
'subMerchantId' => 3,
'subMerchantPrice' => 18
)
)
);
$response = FunctionalTestConfig::tokenpay()->payment()->init3DSPayment($request);
print_r($response);