Skip to content

Commit

Permalink
added Declined state
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoshualewis committed Aug 16, 2021
1 parent 750fd5c commit 4c341eb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions code/Bitpay/BPCheckout/Model/IpnManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,9 @@ public function postIpn()
break;

case 'invoice_expired':
if ($invoice_status == 'expired'):
$order->addStatusHistoryComment('BitPay Invoice <a href = "http://' . $item->invoice_endpoint . '/dashboard/payments/' . $order_invoice . '" target = "_blank">' . $order_invoice . '</a> has expired.');
case 'invoice_declined':
if ($invoice_status == 'expired' || $invoice_status == 'declined'):
$order->addStatusHistoryComment('BitPay Invoice <a href = "http://' . $item->invoice_endpoint . '/dashboard/payments/' . $order_invoice . '" target = "_blank">' . $order_invoice . '</a> has been declined / expired.');
if ($bitpay_cancel_mapping == "cancel"):
$order->setState(Order::STATE_CANCELED)->setStatus(Order::STATE_CANCELED);
endif;
Expand Down Expand Up @@ -401,6 +402,6 @@ public function createMGInvoice($order)
}
public function getExtensionVersion()
{
return 'Bitpay_BPCheckout_Magento2_6.12.4';
return 'Bitpay_BPCheckout_Magento2_6.13.0';
}
}
2 changes: 1 addition & 1 deletion code/Bitpay/BPCheckout/Observer/BPRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
} //end execute function
public function getExtensionVersion()
{
return 'Bitpay_BPCheckout_Magento2_6.12.4';
return 'Bitpay_BPCheckout_Magento2_6.13.0';

}

Expand Down
2 changes: 1 addition & 1 deletion code/Bitpay/BPCheckout/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "",
"type": "magento2-module",
"license": "mit",
"version":"6.12.4",
"version":"6.13.0",
"authors": [
{
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion code/Bitpay/BPCheckout/etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Bitpay_BPCheckout" setup_version="6.12.4"></module>
<module name="Bitpay_BPCheckout" setup_version="6.13.0"></module>
</config>

0 comments on commit 4c341eb

Please sign in to comment.