Skip to content

Commit

Permalink
Simplify callback logic slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
RBech committed Oct 2, 2017
1 parent 887c5ce commit 06655fe
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function callbackAction()

// Save the order into the quickpaypayment_order_status table
// IMPORTANT to update the status as 1 to ensure that the stock is handled correctly!
if (($request->accepted && $operation->type == 'authorize' && $operation->qp_status_code == "20000") || ($operation->type == 'authorize' && $operation->qp_status_code == "20200" && $operation->pending == true)) {
if ($request->accepted && $operation->type == 'authorize') {
if ($operation->pending == true) {
Mage::log('Transaction accepted but pending', null, 'qp_callback.log');
} else {
Expand Down Expand Up @@ -208,7 +208,6 @@ public function callbackAction()

$payment = Mage::getModel('quickpaypayment/payment');

// TODO: Consider to set pending payments in another state, must be handled in the api functions
if ($order->getStatus() != $payment->getConfigData('order_status_after_payment')) {
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, $payment->getConfigData('order_status_after_payment'));
$order->save();
Expand Down

0 comments on commit 06655fe

Please sign in to comment.