Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding option to map bitpay paid invoice status #69

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

farjad6
Copy link
Contributor

@farjad6 farjad6 commented Jan 12, 2024

No description provided.

@bobbrodie
Copy link
Contributor

@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
Copy link
Contributor Author

farjad6 commented Jan 14, 2024

@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
Copy link
Contributor

Awesome, thank you so much!

Copy link
Contributor

@shaunek-hero shaunek-hero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things look solid to me but I do have one small suggestion

BitPayLib/class-bitpayipnprocess.php Outdated Show resolved Hide resolved
@bobbrodie bobbrodie merged commit 48986ea into bitpay:master Jan 18, 2024
3 checks passed
@bobbrodie
Copy link
Contributor

Will be released with our 5.4.0 version, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants