|
14 | 14 | $config = (new Config())->setUsername($_REQUEST['username'] ?? '')->setPassword($_REQUEST['password'] ?? '');
|
15 | 15 |
|
16 | 16 | try {
|
17 |
| - $transaction = (new TransactionStatusRequest($orderId))->setConfig($config)->start(); |
| 17 | + $payOrder = (new TransactionStatusRequest($orderId))->setConfig($config)->start(); |
18 | 18 | } catch (PayException $e) {
|
19 | 19 | echo '<pre>';
|
20 | 20 | echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
|
|
27 | 27 | echo '<pre>';
|
28 | 28 | echo 'Success, values:' . PHP_EOL.PHP_EOL;
|
29 | 29 |
|
30 |
| -echo 'isPending: ' . ($transaction->isPending() ? 'YES' : 'no') . PHP_EOL; |
31 |
| -echo 'isPaid: ' . ($transaction->isPaid() ? 'YES' : 'no') . PHP_EOL; |
32 |
| -echo 'isAuthorized: ' . ($transaction->isAuthorized() ? 'YES' : 'no') . PHP_EOL; |
33 |
| -echo 'isCancelled: ' . ($transaction->isCancelled() ? 'YES' : 'no') . PHP_EOL; |
34 |
| -echo 'isBeingVerified: ' . ($transaction->isBeingVerified() ? 'YES' : 'no') . PHP_EOL; |
35 |
| -echo 'isChargeBack: ' . ($transaction->isChargeBack() ? 'YES' : 'no') . PHP_EOL; |
36 |
| -echo 'isPartialPayment: ' . ($transaction->isPartialPayment() ? 'YES' : 'no') . PHP_EOL; |
37 |
| -echo 'isRefunded: ' . ($transaction->isRefunded() ? 'YES' : 'no') . PHP_EOL; |
38 |
| -echo 'isPartiallyRefunded: ' . ($transaction->isPartiallyRefunded() ? 'YES' : 'no') . PHP_EOL . PHP_EOL; |
39 |
| - |
40 |
| -echo 'getStatusCode: ' . $transaction->getStatusCode() . PHP_EOL; |
41 |
| -echo 'getStatusName: ' . $transaction->getStatusName() . PHP_EOL; |
42 |
| -echo 'getId: ' . $transaction->getId() . PHP_EOL; |
43 |
| -echo 'getOrderId: ' . $transaction->getOrderId() . PHP_EOL; |
44 |
| -echo 'getServiceCode: ' . $transaction->getServiceCode() . PHP_EOL; |
45 |
| -echo 'getDescription: ' . $transaction->getDescription() . PHP_EOL; |
46 |
| -echo 'getReference: ' . $transaction->getReference() . PHP_EOL; |
47 |
| -echo 'getIpAddress: ' . $transaction->getIpAddress() . PHP_EOL.PHP_EOL; |
48 |
| -echo 'getAmount: ' . $transaction->getAmount() . PHP_EOL; |
49 |
| -echo 'getCurrency: ' . $transaction->getCurrency() . PHP_EOL; |
50 |
| - |
51 |
| -echo 'getAmountConverted: ' . $transaction->getAmountConverted() . PHP_EOL; |
52 |
| -echo 'getAmountConvertedCurrency: ' . $transaction->getAmountConvertedCurrency() . PHP_EOL; |
53 |
| -echo 'getAmountPaid: ' . $transaction->getAmountPaid() . PHP_EOL; |
54 |
| -echo 'getAmountPaidCurrency: ' . $transaction->getAmountPaidCurrency() . PHP_EOL; |
55 |
| -echo 'getAmountRefunded: ' . $transaction->getAmountRefunded() . PHP_EOL; |
56 |
| -echo 'getAmountRefundedCurrency: ' . $transaction->getAmountRefundedCurrency() . PHP_EOL.PHP_EOL; |
57 |
| - |
58 |
| -echo 'paymentMethod: ' . $transaction->getPaymentMethod()['id'] . PHP_EOL; |
59 |
| -echo 'getPaymentProfileId: ' . $transaction->getPaymentProfileId() . PHP_EOL; |
60 |
| -echo 'integration: ' . ($transaction->getIntegration()['testMode'] === true ? '1' : 0) . PHP_EOL; |
61 |
| -echo 'expiresAt: ' . $transaction->getExpiresAt() . PHP_EOL; |
62 |
| -echo 'createdAt: ' . $transaction->getCreatedAt() . PHP_EOL; |
63 |
| -print_r($transaction->getPaymentData()); |
| 30 | +echo 'isPending: ' . ($payOrder->isPending() ? 'YES' : 'no') . PHP_EOL; |
| 31 | +echo 'isPaid: ' . ($payOrder->isPaid() ? 'YES' : 'no') . PHP_EOL; |
| 32 | +echo 'isAuthorized: ' . ($payOrder->isAuthorized() ? 'YES' : 'no') . PHP_EOL; |
| 33 | +echo 'isCancelled: ' . ($payOrder->isCancelled() ? 'YES' : 'no') . PHP_EOL; |
| 34 | +echo 'isBeingVerified: ' . ($payOrder->isBeingVerified() ? 'YES' : 'no') . PHP_EOL; |
| 35 | +echo 'isChargeBack: ' . ($payOrder->isChargeBack() ? 'YES' : 'no') . PHP_EOL; |
| 36 | +echo 'isPartialPayment: ' . ($payOrder->isPartialPayment() ? 'YES' : 'no') . PHP_EOL; |
| 37 | +echo 'isRefunded: ' . ($payOrder->isRefunded() ? 'YES' : 'no') . PHP_EOL; |
| 38 | +echo 'isPartiallyRefunded: ' . ($payOrder->isRefundedPartial() ? 'YES' : 'no') . PHP_EOL . PHP_EOL; |
| 39 | +echo 'getStatusCode: ' . $payOrder->getStatusCode() . PHP_EOL; |
| 40 | +echo 'getStatusName: ' . $payOrder->getStatusName() . PHP_EOL; |
| 41 | +echo 'getId: ' . $payOrder->getId() . PHP_EOL; |
| 42 | +echo 'getOrderId: ' . $payOrder->getOrderId() . PHP_EOL; |
| 43 | +echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL; |
| 44 | +echo 'getReference: ' . $payOrder->getReference() . PHP_EOL; |
| 45 | +echo 'getAmount: ' . $payOrder->getAmount() . PHP_EOL; |
| 46 | +echo 'getCurrency: ' . $payOrder->getCurrency() . PHP_EOL; |
| 47 | +echo 'integration: ' . ($payOrder->getIntegration()['testMode'] === true ? '1' : 0) . PHP_EOL; |
| 48 | +echo 'expiresAt: ' . $payOrder->getExpiresAt() . PHP_EOL; |
| 49 | +echo 'createdAt: ' . $payOrder->getCreatedAt() . PHP_EOL; |
0 commit comments