bitpay / bitpay-checkout-for-woocommerce

BitPay Checkout for WooCommerce
MIT License
14 stars 22 forks source link

Adding option to map bitpay paid invoice status #69

Closed farjad6 closed 6 months ago

bobbrodie commented 6 months ago

@farjad6 and @shaunek-hero thank you so much for the contribution! Prior to merging this in, could you update so that PHPCS passes? We are using WordPress' PHP coding standards.

Example action is here.

And this is the output, all minor stuff, all fixable by phpcbf:

FILE: ...pay-checkout-for-woocommerce/BitPayLib/class-wcgatewaybitpay.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 22 WARNINGS AFFECTING 22 LINES
----------------------------------------------------------------------
  59 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 35 space(s) between "'enabled'" and
     |         |     double arrow, but found 30.
  66 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 31 space(s) between "'bitpay_logo'" and
     |         |     double arrow, but found 26.
  87 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 19 space(s) between
     |         |     "'bitpay_logo_image_white'" and double arrow,
     |         |     but found 14.
  93 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 20 space(s) between
     |         |     "'bitpay_logo_image_dark'" and double arrow, but
     |         |     found 15.
  99 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'bitpay_checkout_info'" and double arrow, but
     |         |     found 17.
 104 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 13 space(s) between
     |         |     "'bitpay_checkout_merchant_info'" and double
     |         |     arrow, but found 8.
 109 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 17 space(s) between
     |         |     "'bitpay_checkout_tier_info'" and double arrow,
     |         |     but found 12.
 114 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 31 space(s) between "'description'" and
     |         |     double arrow, but found 26.
 122 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 17 space(s) between
     |         |     "'bitpay_checkout_token_dev'" and double arrow,
     |         |     but found 12.
 130 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 16 space(s) between
     |         |     "'bitpay_checkout_token_prod'" and double arrow,
     |         |     but found 11.
 139 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 18 space(s) between
     |         |     "'bitpay_checkout_endpoint'" and double arrow,
     |         |     but found 13.
 150 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'bitpay_checkout_flow'" and double arrow, but
     |         |     found 17.
 160 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'bitpay_checkout_slug'" and double arrow, but
     |         |     found 17.
 165 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 20 space(s) between
     |         |     "'bitpay_custom_redirect'" and double arrow, but
     |         |     found 15.
 170 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 26 space(s) between
     |         |     "'bitpay_close_url'" and double arrow, but found
     |         |     21.
 175 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'bitpay_checkout_mini'" and double arrow, but
     |         |     found 17.
 186 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 13 space(s) between
     |         |     "'bitpay_checkout_capture_email'" and double
     |         |     arrow, but found 8.
 197 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 10 space(s) between
     |         |     "'bitpay_checkout_checkout_message'" and double
     |         |     arrow, but found 5.
 203 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 21 space(s) between
     |         |     "'bitpay_checkout_error'" and double arrow, but
     |         |     found 16.
 209 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 13 space(s) between
     |         |     "'bitpay_checkout_error_message'" and double
     |         |     arrow, but found 8.
 253 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 6 space(s) between
     |         |     "'bitpay_checkout_order_expired_status'" and
     |         |     double arrow, but found 1.
 265 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected [27](https://github.com/bitpay/bitpay-checkout-for-woocommerce/actions/runs/7508308802/job/20471899341#step:5:28) space(s) between "'bitpay_log_mode'"
     |         |     and double arrow, but found 22.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 22 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Thanks again!

farjad6 commented 6 months ago

@farjad6 and @shaunek-hero thank you so much for the contribution! Prior to merging this in, could you update so that PHPCS passes? We are using WordPress' PHP coding standards.

Example action is here.

And this is the output, all minor stuff, all fixable by phpcbf:

FILE: ...pay-checkout-for-woocommerce/BitPayLib/class-wcgatewaybitpay.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 22 WARNINGS AFFECTING 22 LINES
----------------------------------------------------------------------
  59 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 35 space(s) between "'enabled'" and
     |         |     double arrow, but found 30.
  66 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 31 space(s) between "'bitpay_logo'" and
     |         |     double arrow, but found 26.
  87 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 19 space(s) between
     |         |     "'bitpay_logo_image_white'" and double arrow,
     |         |     but found 14.
  93 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 20 space(s) between
     |         |     "'bitpay_logo_image_dark'" and double arrow, but
     |         |     found 15.
  99 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'bitpay_checkout_info'" and double arrow, but
     |         |     found 17.
 104 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 13 space(s) between
     |         |     "'bitpay_checkout_merchant_info'" and double
     |         |     arrow, but found 8.
 109 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 17 space(s) between
     |         |     "'bitpay_checkout_tier_info'" and double arrow,
     |         |     but found 12.
 114 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 31 space(s) between "'description'" and
     |         |     double arrow, but found 26.
 122 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 17 space(s) between
     |         |     "'bitpay_checkout_token_dev'" and double arrow,
     |         |     but found 12.
 130 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 16 space(s) between
     |         |     "'bitpay_checkout_token_prod'" and double arrow,
     |         |     but found 11.
 139 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 18 space(s) between
     |         |     "'bitpay_checkout_endpoint'" and double arrow,
     |         |     but found 13.
 150 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'bitpay_checkout_flow'" and double arrow, but
     |         |     found 17.
 160 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'bitpay_checkout_slug'" and double arrow, but
     |         |     found 17.
 165 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 20 space(s) between
     |         |     "'bitpay_custom_redirect'" and double arrow, but
     |         |     found 15.
 170 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 26 space(s) between
     |         |     "'bitpay_close_url'" and double arrow, but found
     |         |     21.
 175 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 22 space(s) between
     |         |     "'bitpay_checkout_mini'" and double arrow, but
     |         |     found 17.
 186 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 13 space(s) between
     |         |     "'bitpay_checkout_capture_email'" and double
     |         |     arrow, but found 8.
 197 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 10 space(s) between
     |         |     "'bitpay_checkout_checkout_message'" and double
     |         |     arrow, but found 5.
 203 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 21 space(s) between
     |         |     "'bitpay_checkout_error'" and double arrow, but
     |         |     found 16.
 209 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 13 space(s) between
     |         |     "'bitpay_checkout_error_message'" and double
     |         |     arrow, but found 8.
 253 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected 6 space(s) between
     |         |     "'bitpay_checkout_order_expired_status'" and
     |         |     double arrow, but found 1.
 265 | WARNING | [x] Array double arrow not aligned correctly;
     |         |     expected [27](https://github.com/bitpay/bitpay-checkout-for-woocommerce/actions/runs/7508308802/job/20471899341#step:5:28) space(s) between "'bitpay_log_mode'"
     |         |     and double arrow, but found 22.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 22 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Thanks again!

done

bobbrodie commented 6 months ago

Awesome, thank you so much!

bobbrodie commented 6 months ago

Will be released with our 5.4.0 version, thank you!