Skip to content

Commit

Permalink
Merge pull request #9 from azambon/master
Browse files Browse the repository at this point in the history
Fixes the initial state of new orders
  • Loading branch information
renatocason authored Jan 2, 2018
2 parents c7257ae + 4905878 commit 48f7948
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/app/code/community/Bitbull/Satispay/Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ public function initialize($paymentAction, $stateObject)
$session->setOrderId($orderId)
->setCurrency($currency)
->setAmount(round($amount * 100));

$stateObject->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);

//It would be better to ask Magento for the default status of the "pending_payment" state,
//but as other parts of the module explicitly check the status against this constant, then
//I think it's fine to leave this here.
$stateObject->setStatus(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);

return $this;
}
Expand Down
1 change: 0 additions & 1 deletion src/app/code/community/Bitbull/Satispay/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
<payment>
<satispay>
<title>Pay with Satispay</title>
<order_status>pending_payment</order_status>
<payment_action>sale</payment_action>
<model>satispay/payment</model>
<default_country_code>+39</default_country_code>
Expand Down

0 comments on commit 48f7948

Please sign in to comment.