Skip to content

Commit

Permalink
Updated sample
Browse files Browse the repository at this point in the history
  • Loading branch information
woutse committed Jun 14, 2021
1 parent b8ba8dc commit dd90655
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions samples/return.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
require_once 'config.php';

try {
$transaction = \Paynl\Transaction::getForReturn();
$transactionId = $_REQUEST['orderId'];
$transaction = \Paynl\Transaction::status($transactionId);


if ($transaction->isPaid() ||
$transaction->isPending() //manual transfer transactions are always pending when the user is returned
) {
# Manual transfer transactions are always pending when the user is returned
if ($transaction->isPaid() || $transaction->isPending()) {
// redirect to thank you page
echo "Thank you<br /><a href='transaction/start.php'>New payment</a>";
if ($transaction->isPaid()) {
Expand All @@ -41,4 +40,4 @@
}
} catch (\Paynl\Error\Error $e) {
echo "Fout: " . $e->getMessage();
}
}

0 comments on commit dd90655

Please sign in to comment.