From 802b285b10ce51ce57d9b096483776cd157071a3 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 6 Oct 2014 15:59:46 +0200 Subject: [PATCH] Fixed issues in paypal payment procession --- .../files/lib/action/PaypalCallbackAction.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php index d5af4a4a3e..7e8ac4775a 100644 --- a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php +++ b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php @@ -69,16 +69,19 @@ class PaypalCallbackAction extends AbstractAction { $processor = $objectType->getProcessor(); // get status + $transactionType = (!empty($_POST['txn_type']) ? $_POST['txn_type'] : ''); + $paymentStatus = (!empty($_POST['payment_status']) ? $_POST['payment_status'] : ''); + $status = ''; - if ($_POST['txn_type'] == 'web_accept' || $_POST['txn_type'] == 'subscr_payment') { - if ($_POST['payment_status'] == 'Completed') { + if ($transactionType == 'web_accept' || $transactionType == 'subscr_payment') { + if ($paymentStatus == 'Completed') { $status = 'completed'; } } - if ($_POST['payment_status'] == 'Refunded' || $_POST['payment_status'] == 'Reversed') { + if ($paymentStatus == 'Refunded' || $paymentStatus == 'Reversed') { $status = 'reversed'; } - if ($_POST['payment_status'] == 'Canceled_Reversal') { + if ($paymentStatus == 'Canceled_Reversal') { $status = 'canceled_reversal'; } -- 2.20.1