Skip to content

Commit

Permalink
Merge pull request #86 from p-maguire/SP-923
Browse files Browse the repository at this point in the history
SP-923: Allow additional statuses for validations
  • Loading branch information
bobbrodie committed Apr 26, 2024
2 parents 2bcf0e4 + 73d1581 commit 7c150fa
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion BitPayLib/Blocks/class-bitpaypaymentsblocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/Exception/class-bitpayinvalidorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpaycancelorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpaycart.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpaycheckouttransactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpayclientfactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpayinvoicecreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
6 changes: 3 additions & 3 deletions BitPayLib/class-bitpayipnprocess.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down Expand Up @@ -165,7 +165,7 @@ private function get_bitpay_dashboard_link( string $invoice_id ): string {
}

private function process_confirmed( Invoice $bitpay_invoice, WC_Order $order ): void {
$this->validate_bitpay_status_in_available_statuses( $bitpay_invoice, array( 'confirmed' ) );
$this->validate_bitpay_status_in_available_statuses( $bitpay_invoice, array( 'confirmed', 'complete' ) );

$invoice_id = $bitpay_invoice->getId();
$wordpress_order_status = $this->get_gateway_settings()['bitpay_checkout_order_process_confirmed_status'];
Expand Down Expand Up @@ -296,7 +296,7 @@ private function process_refunded( Invoice $bitpay_invoice, WC_Order $order ): v
}

private function process_processing( Invoice $bitpay_invoice, WC_Order $order ): void {
$this->validate_bitpay_status_in_available_statuses( $bitpay_invoice, array( 'paid' ) );
$this->validate_bitpay_status_in_available_statuses( $bitpay_invoice, array( 'paid', 'confirmed', 'complete' ) );
$invoice_id = $bitpay_invoice->getId();
$order->add_order_note( $this->get_start_order_note( $invoice_id ) . 'is paid and awaiting confirmation.' );

Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpaylogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpaypages.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpaypaymentsettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-bitpaypluginsetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/class-wcgatewaybitpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion BitPayLib/trait-wpdbhelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

# 5.4.1
* Improved webhook validation to improve timing issues

# 5.4.0
* Added compatibility with Checkout Blocks
* Fixed Checkout Flow (BitPay Modal)
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: BitPay Checkout for WooCommerce
* Plugin URI: https://www.bitpay.com
* Description: BitPay Checkout Plugin
* Version: 5.4.0
* Version: 5.4.1
* Author: BitPay
* Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce
*/
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ You can contact our support team via the following form https://bitpay.com/reque

== Changelog ==

= 5.4.1 =
* Improved webhook validation to improve timing issues

= 5.4.0 =
* Added compatibility with Checkout Blocks
* Fixed Checkout Flow (BitPay Modal)
Expand Down

0 comments on commit 7c150fa

Please sign in to comment.