Skip to content

Commit

Permalink
Updates for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
woutse committed Nov 12, 2024
1 parent 3cdb7d5 commit 9b8c933
Show file tree
Hide file tree
Showing 26 changed files with 734 additions and 373 deletions.
6 changes: 4 additions & 2 deletions config/config.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

return [
'authentication' => [
'username' => '', # Use AT-Code or SL-Code. Use AT-code together with API-Token.
'password' => '', # Use API-Token or secret. Use Secret in combination with SL-Code.
#'username' => 'AT-0045-3283', # Use AT-Code or SL-Code. Use AT-code together with API-Token.
#'password' => 'a3e314eef828b10d53eb9c1142b00f0262c14ab2', # Use API-Token or secret. Use Secret in combination with SL-Code.
],
'debug' => false,
#'failoverUrl' => 'https://dev-wouter.tintel.dev/sandbox_sdk3.php',
#'api' => ['url' => ''] # Core
#'api' => ['url' => ''] # Core
];
4 changes: 2 additions & 2 deletions samples/OrderAbort.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
echo 'getTransactionId: ' . $transaction->getOrderId() . PHP_EOL;
echo 'getDescription: ' . $transaction->getDescription() . PHP_EOL;
echo 'getReference: ' . $transaction->getReference() . PHP_EOL;
echo 'getAmount getValue: ' . $transaction->getAmount()->getValue() . PHP_EOL;
echo 'getAmount getCurrency: ' . $transaction->getAmount()->getCurrency() . PHP_EOL;
echo 'getAmount getValue: ' . $transaction->getAmount() . PHP_EOL;
echo 'getAmount getCurrency: ' . $transaction->getAmount() . PHP_EOL;
echo 'getAuthorizedAmount getCurrency: ' . $transaction->getAuthorizedAmount()->getCurrency() . PHP_EOL;
echo 'getAuthorizedAmount getValue: ' . $transaction->getAuthorizedAmount()->getValue() . PHP_EOL;
echo 'getStatus:' . print_r($transaction->getStatus(), true) . PHP_EOL;
Expand Down
33 changes: 15 additions & 18 deletions samples/OrderApprove.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$orderApproveRequest->setConfig($config);

try {
$transaction = $orderApproveRequest->start();
$payOrder = $orderApproveRequest->start();
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -33,20 +33,17 @@

echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getOrderId: ' . $transaction->getId() . PHP_EOL;
echo 'getTransactionId: ' . $transaction->getOrderId() . PHP_EOL;
echo 'getDescription: ' . $transaction->getDescription() . PHP_EOL;
echo 'getReference: ' . $transaction->getReference() . PHP_EOL;
echo 'getAmount getValue: ' . $transaction->getAmount()->getValue() . PHP_EOL;
echo 'getAmount getCurrency: ' . $transaction->getAmount()->getCurrency() . PHP_EOL;
echo 'getAuthorizedAmount getCurrency: ' . $transaction->getAuthorizedAmount()->getCurrency() . PHP_EOL;
echo 'getAuthorizedAmount getValue: ' . $transaction->getAuthorizedAmount()->getValue() . PHP_EOL;
echo 'getStatus:' . print_r($transaction->getStatus(), true) . PHP_EOL;
echo 'getPaymentData:' . print_r($transaction->getPayments(), true) . PHP_EOL;
echo 'getIntegration:' . print_r($transaction->getIntegration(), true) . PHP_EOL;
echo 'getExpiresAt: ' . $transaction->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $transaction->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $transaction->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $transaction->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $transaction->getModifiedBy() . PHP_EOL;

echo 'getOrderId: ' . $payOrder->getId() . PHP_EOL;
echo 'getTransactionId: ' . $payOrder->getOrderId() . PHP_EOL;
echo 'getServiceId: ' . $payOrder->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL;
echo 'getReference: ' . $payOrder->getReference() . PHP_EOL;
echo 'getAmount getValue: ' . $payOrder->getAmount() . PHP_EOL;
echo 'getAmount getCurrency: ' . $payOrder->getCurrency() . PHP_EOL;
echo 'getStatus:' . print_r($payOrder->getStatus(), true) . PHP_EOL;
echo 'getTestmode: ' . ($payOrder->isTestmode() === true ? 'test order' : 'live order') . PHP_EOL;
echo 'getExpiresAt: ' . $payOrder->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $payOrder->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $payOrder->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $payOrder->getModifiedBy() . PHP_EOL;
34 changes: 15 additions & 19 deletions samples/OrderCapture.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
$orderCaptureRequest->setConfig($config);

try {
$capture = $orderCaptureRequest->start();
$payOrder = $orderCaptureRequest->start();
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -33,21 +33,17 @@

echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getOrderId: ' . $capture->getId() . PHP_EOL;
echo 'getTransactionId: ' . $capture->getOrderId() . PHP_EOL;
echo 'getServiceCode: ' . $capture->getServiceCode() . PHP_EOL;
echo 'getDescription: ' . $capture->getDescription() . PHP_EOL;
echo 'getReference: ' . $capture->getReference() . PHP_EOL;
echo 'getIpAddress: ' . $capture->getIpAddress() . PHP_EOL;
echo 'getAmount getValue: ' . $capture->getAmount()->getValue() . PHP_EOL;
echo 'getAmount getCurrency: ' . $capture->getAmount()->getCurrency() . PHP_EOL;
echo 'getStatus:' . print_r($capture->getStatus(), true) . PHP_EOL;

echo 'getIntegration:' . print_r($capture->getIntegration(), true) . PHP_EOL;
echo 'getExpiresAt: ' . $capture->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $capture->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $capture->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $capture->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $capture->getModifiedBy() . PHP_EOL;
echo 'getDeletedAt: ' . $capture->getDeletedAt() . PHP_EOL;
echo 'getDeletedBy: ' . $capture->getDeletedBy() . PHP_EOL;
echo 'getOrderId: ' . $payOrder->getId() . PHP_EOL;
echo 'getTransactionId: ' . $payOrder->getOrderId() . PHP_EOL;
echo 'getServiceId: ' . $payOrder->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL;
echo 'getReference: ' . $payOrder->getReference() . PHP_EOL;
echo 'getAmount getValue: ' . $payOrder->getAmount() . PHP_EOL;
echo 'getAmount getCurrency: ' . $payOrder->getCurrency() . PHP_EOL;
echo 'getStatus:' . print_r($payOrder->getStatus(), true) . PHP_EOL;
echo 'getTestmode: ' . ($payOrder->isTestmode() === true ? 'test order' : 'live order') . PHP_EOL;
echo 'getExpiresAt: ' . $payOrder->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $payOrder->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $payOrder->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $payOrder->getModifiedBy() . PHP_EOL;
34 changes: 15 additions & 19 deletions samples/OrderCaptureAmount.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$orderCaptureRequest->setConfig($config);

try {
$capture = $orderCaptureRequest->start();
$payOrder = $orderCaptureRequest->start();
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -35,21 +35,17 @@

echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getOrderId: ' . $capture->getId() . PHP_EOL;
echo 'getTransactionId: ' . $capture->getOrderId() . PHP_EOL;
echo 'getServiceCode: ' . $capture->getServiceCode() . PHP_EOL;
echo 'getDescription: ' . $capture->getDescription() . PHP_EOL;
echo 'getReference: ' . $capture->getReference() . PHP_EOL;
echo 'getIpAddress: ' . $capture->getIpAddress() . PHP_EOL;
echo 'getAmount getValue: ' . $capture->getAmount()->getValue() . PHP_EOL;
echo 'getAmount getCurrency: ' . $capture->getAmount()->getCurrency() . PHP_EOL;
echo 'getStatus:' . print_r($capture->getStatus(), true) . PHP_EOL;

echo 'getIntegration:' . print_r($capture->getIntegration(), true) . PHP_EOL;
echo 'getExpiresAt: ' . $capture->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $capture->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $capture->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $capture->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $capture->getModifiedBy() . PHP_EOL;
echo 'getDeletedAt: ' . $capture->getDeletedAt() . PHP_EOL;
echo 'getDeletedBy: ' . $capture->getDeletedBy() . PHP_EOL;
echo 'getOrderId: ' . $payOrder->getId() . PHP_EOL;
echo 'getTransactionId: ' . $payOrder->getOrderId() . PHP_EOL;
echo 'getServiceId: ' . $payOrder->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL;
echo 'getReference: ' . $payOrder->getReference() . PHP_EOL;
echo 'getAmount getValue: ' . $payOrder->getAmount() . PHP_EOL;
echo 'getAmount getCurrency: ' . $payOrder->getCurrency() . PHP_EOL;
echo 'getStatus:' . print_r($payOrder->getStatus(), true) . PHP_EOL;
echo 'getTestmode: ' . ($payOrder->isTestmode() === true ? 'test order' : 'live order') . PHP_EOL;
echo 'getExpiresAt: ' . $payOrder->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $payOrder->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $payOrder->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $payOrder->getModifiedBy() . PHP_EOL;
35 changes: 16 additions & 19 deletions samples/OrderCaptureProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$orderCaptureRequest->setConfig($config);

try {
$capture = $orderCaptureRequest->start();
$payOrder = $orderCaptureRequest->start();
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -35,23 +35,20 @@
exit();
}


echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getOrderId: ' . $capture->getId() . PHP_EOL;
echo 'getTransactionId: ' . $capture->getOrderId() . PHP_EOL;
echo 'getServiceCode: ' . $capture->getServiceCode() . PHP_EOL;
echo 'getDescription: ' . $capture->getDescription() . PHP_EOL;
echo 'getReference: ' . $capture->getReference() . PHP_EOL;
echo 'getIpAddress: ' . $capture->getIpAddress() . PHP_EOL;
echo 'getAmount getValue: ' . $capture->getAmount()->getValue() . PHP_EOL;
echo 'getAmount getCurrency: ' . $capture->getAmount()->getCurrency() . PHP_EOL;
echo 'getStatus:' . print_r($capture->getStatus(), true) . PHP_EOL;

echo 'getIntegration:' . print_r($capture->getIntegration(), true) . PHP_EOL;
echo 'getExpiresAt: ' . $capture->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $capture->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $capture->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $capture->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $capture->getModifiedBy() . PHP_EOL;
echo 'getDeletedAt: ' . $capture->getDeletedAt() . PHP_EOL;
echo 'getDeletedBy: ' . $capture->getDeletedBy() . PHP_EOL;
echo 'getOrderId: ' . $payOrder->getId() . PHP_EOL;
echo 'getTransactionId: ' . $payOrder->getOrderId() . PHP_EOL;
echo 'getServiceId: ' . $payOrder->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL;
echo 'getReference: ' . $payOrder->getReference() . PHP_EOL;
echo 'getAmount getValue: ' . $payOrder->getAmount() . PHP_EOL;
echo 'getAmount getCurrency: ' . $payOrder->getCurrency() . PHP_EOL;
echo 'getStatus:' . print_r($payOrder->getStatus(), true) . PHP_EOL;
echo 'getTestmode: ' . ($payOrder->isTestmode() === true ? 'test order' : 'live order') . PHP_EOL;
echo 'getExpiresAt: ' . $payOrder->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $payOrder->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $payOrder->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $payOrder->getModifiedBy() . PHP_EOL;
37 changes: 19 additions & 18 deletions samples/OrderCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
$request->setConfig($config);

try {
$transaction = $request->start();
$payOrder = $request->start();
echo get_class($payOrder);
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -120,20 +121,20 @@

echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getId: ' . $transaction->getId() . PHP_EOL;
echo 'getServiceId: ' . $transaction->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $transaction->getDescription() . PHP_EOL;
echo 'getReference: ' . $transaction->getReference() . PHP_EOL;
echo 'getManualTransferCode: ' . $transaction->getManualTransferCode() . PHP_EOL;
echo 'getOrderId: ' . $transaction->getOrderId() . PHP_EOL;
echo 'getPaymentUrl: ' . '<a target="_blank" href="' . $transaction->getPaymentUrl() . '">' . $transaction->getPaymentUrl() . '</a>' . PHP_EOL;
echo 'getStatusUrl: ' . $transaction->getStatusUrl() . PHP_EOL;
echo 'getAmount value: ' . $transaction->getAmount()->getValue() . PHP_EOL;
echo 'getAmount currency: ' . $transaction->getAmount()->getCurrency() . PHP_EOL;
echo 'getUuid: ' . $transaction->getUuid() . PHP_EOL;
echo 'expiresAt: ' . $transaction->getExpiresAt() . PHP_EOL;
echo 'createdAt: ' . $transaction->getCreatedAt() . PHP_EOL;
echo 'createdBy: ' . $transaction->getCreatedBy() . PHP_EOL;
echo 'getCreatedAt: ' . $transaction->getCreatedAt() . PHP_EOL;
echo 'modifiedAt: ' . $transaction->getModifiedAt() . PHP_EOL;
echo 'modifiedBy: ' . $transaction->getModifiedBy() . PHP_EOL;
echo 'getId: ' . $payOrder->getId() . PHP_EOL;
echo 'getServiceId: ' . $payOrder->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL;
echo 'getReference: ' . $payOrder->getReference() . PHP_EOL;
echo 'getManualTransferCode: ' . $payOrder->getManualTransferCode() . PHP_EOL;
echo 'getOrderId: ' . $payOrder->getOrderId() . PHP_EOL;
echo 'getPaymentUrl: ' . '<a target="_blank" href="' . $payOrder->getPaymentUrl() . '">' . $payOrder->getPaymentUrl() . '</a>' . PHP_EOL;
echo 'getStatusUrl: ' . $payOrder->getStatusUrl() . PHP_EOL;
echo 'getAmount value: ' . $payOrder->getAmount() . PHP_EOL;
echo 'getAmount currency: ' . $payOrder->getCurrency() . PHP_EOL;
echo 'getUuid: ' . $payOrder->getUuid() . PHP_EOL;
echo 'expiresAt: ' . $payOrder->getExpiresAt() . PHP_EOL;
echo 'createdAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'createdBy: ' . $payOrder->getCreatedBy() . PHP_EOL;
echo 'getCreatedAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'modifiedAt: ' . $payOrder->getModifiedAt() . PHP_EOL;
echo 'modifiedBy: ' . $payOrder->getModifiedBy() . PHP_EOL;
36 changes: 18 additions & 18 deletions samples/OrderCreateFastCheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
$request->setConfig($config);

try {
$transaction = $request->start();
$payOrder = $request->start();
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -51,20 +51,20 @@

echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getId: ' . $transaction->getId() . PHP_EOL;
echo 'getServiceId: ' . $transaction->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $transaction->getDescription() . PHP_EOL;
echo 'getReference: ' . $transaction->getReference() . PHP_EOL;
echo 'getManualTransferCode: ' . $transaction->getManualTransferCode() . PHP_EOL;
echo 'getOrderId: ' . $transaction->getOrderId() . PHP_EOL;
echo 'getPaymentUrl: ' . '<a target="_blank" href="' . $transaction->getPaymentUrl() . '">' . $transaction->getPaymentUrl() . '</a>' . PHP_EOL;
echo 'getStatusUrl: ' . $transaction->getStatusUrl() . PHP_EOL;
echo 'getAmount value: ' . $transaction->getAmount()->getValue() . PHP_EOL;
echo 'getAmount currency: ' . $transaction->getAmount()->getCurrency() . PHP_EOL;
echo 'getUuid: ' . $transaction->getUuid() . PHP_EOL;
echo 'expiresAt: ' . $transaction->getExpiresAt() . PHP_EOL;
echo 'createdAt: ' . $transaction->getCreatedAt() . PHP_EOL;
echo 'createdBy: ' . $transaction->getCreatedBy() . PHP_EOL;
echo 'getCreatedAt: ' . $transaction->getCreatedAt() . PHP_EOL;
echo 'modifiedAt: ' . $transaction->getModifiedAt() . PHP_EOL;
echo 'modifiedBy: ' . $transaction->getModifiedBy() . PHP_EOL;
echo 'getId: ' . $payOrder->getId() . PHP_EOL;
echo 'getServiceId: ' . $payOrder->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL;
echo 'getReference: ' . $payOrder->getReference() . PHP_EOL;
echo 'getManualTransferCode: ' . $payOrder->getManualTransferCode() . PHP_EOL;
echo 'getOrderId: ' . $payOrder->getOrderId() . PHP_EOL;
echo 'getPaymentUrl: ' . '<a target="_blank" href="' . $payOrder->getPaymentUrl() . '">' . $payOrder->getPaymentUrl() . '</a>' . PHP_EOL;
echo 'getStatusUrl: ' . $payOrder->getStatusUrl() . PHP_EOL;
echo 'getAmount value: ' . $payOrder->getAmount() . PHP_EOL;
echo 'getAmount currency: ' . $payOrder->getAmount() . PHP_EOL;
echo 'getUuid: ' . $payOrder->getUuid() . PHP_EOL;
echo 'expiresAt: ' . $payOrder->getExpiresAt() . PHP_EOL;
echo 'createdAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'createdBy: ' . $payOrder->getCreatedBy() . PHP_EOL;
echo 'getCreatedAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'modifiedAt: ' . $payOrder->getModifiedAt() . PHP_EOL;
echo 'modifiedBy: ' . $payOrder->getModifiedBy() . PHP_EOL;
5 changes: 3 additions & 2 deletions samples/OrderCreateMinimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
$request->setConfig($config);

try {
$transaction = $request->start();
$payOrder = $request->start();
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -33,4 +33,5 @@

echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getPaymentUrl: ' . '<a target="_blank" href="' . $transaction->getPaymentUrl() . '">' . $transaction->getPaymentUrl() . '</a>' . PHP_EOL;
echo 'getOrderId: ' . $payOrder->getOrderId() . PHP_EOL;
echo 'getPaymentUrl: ' . '<a target="_blank" href="' . $payOrder->getPaymentUrl() . '">' . $payOrder->getPaymentUrl() . '</a>' . PHP_EOL;
6 changes: 3 additions & 3 deletions samples/OrderCreatePin.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
$request->setConfig($config);

try {
$transaction = $request->start();
$payOrder = $request->start();
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -104,5 +104,5 @@

echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getId: ' . $transaction->getId() . PHP_EOL;
echo 'getPaymentUrl: ' . '<a target="_blank" href="' . $transaction->getPaymentUrl() . '">' . $transaction->getPaymentUrl() . '</a>' . PHP_EOL;
echo 'getId: ' . $payOrder->getId() . PHP_EOL;
echo 'getPaymentUrl: ' . '<a target="_blank" href="' . $payOrder->getPaymentUrl() . '">' . $payOrder->getPaymentUrl() . '</a>' . PHP_EOL;
33 changes: 15 additions & 18 deletions samples/OrderDecline.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$orderDeclineRequest->setConfig($config);

try {
$transaction = $orderDeclineRequest->start();
$payOrder = $orderDeclineRequest->start();
} catch (PayException $e) {
echo '<pre>';
echo 'Technical message: ' . $e->getMessage() . PHP_EOL;
Expand All @@ -32,20 +32,17 @@

echo '<pre>';
echo 'Success, values:' . PHP_EOL;
echo 'getOrderId: ' . $transaction->getId() . PHP_EOL;
echo 'getTransactionId: ' . $transaction->getOrderId() . PHP_EOL;
echo 'getDescription: ' . $transaction->getDescription() . PHP_EOL;
echo 'getReference: ' . $transaction->getReference() . PHP_EOL;
echo 'getAmount getValue: ' . $transaction->getAmount()->getValue() . PHP_EOL;
echo 'getAmount getCurrency: ' . $transaction->getAmount()->getCurrency() . PHP_EOL;
echo 'getAuthorizedAmount getCurrency: ' . $transaction->getAuthorizedAmount()->getCurrency() . PHP_EOL;
echo 'getAuthorizedAmount getValue: ' . $transaction->getAuthorizedAmount()->getValue() . PHP_EOL;
echo 'getStatus:' . print_r($transaction->getStatus(), true) . PHP_EOL;
echo 'getPaymentData:' . print_r($transaction->getPayments(), true) . PHP_EOL;
echo 'getIntegration:' . print_r($transaction->getIntegration(), true) . PHP_EOL;
echo 'getExpiresAt: ' . $transaction->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $transaction->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $transaction->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $transaction->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $transaction->getModifiedBy() . PHP_EOL;

echo 'getOrderId: ' . $payOrder->getId() . PHP_EOL;
echo 'getTransactionId: ' . $payOrder->getOrderId() . PHP_EOL;
echo 'getServiceId: ' . $payOrder->getServiceId() . PHP_EOL;
echo 'getDescription: ' . $payOrder->getDescription() . PHP_EOL;
echo 'getReference: ' . $payOrder->getReference() . PHP_EOL;
echo 'getAmount getValue: ' . $payOrder->getAmount() . PHP_EOL;
echo 'getAmount getCurrency: ' . $payOrder->getCurrency() . PHP_EOL;
echo 'getStatus:' . print_r($payOrder->getStatus(), true) . PHP_EOL;
echo 'getTestmode: ' . ($payOrder->isTestmode() === true ? 'test order' : 'live order') . PHP_EOL;
echo 'getExpiresAt: ' . $payOrder->getExpiresAt() . PHP_EOL;
echo 'getCreatedAt: ' . $payOrder->getCreatedAt() . PHP_EOL;
echo 'getCreatedBy: ' . $payOrder->getCreatedBy() . PHP_EOL;
echo 'getModifiedAt: ' . $payOrder->getModifiedAt() . PHP_EOL;
echo 'getModifiedBy: ' . $payOrder->getModifiedBy() . PHP_EOL;
Loading

0 comments on commit 9b8c933

Please sign in to comment.