godaddy-wordpress / wc-plugin-framework

The official SkyVerge WooCommerce plugin framework
Other
138 stars 42 forks source link

Feature Request: function for generating idempotency_key #442

Open TimBHowe opened 4 years ago

TimBHowe commented 4 years ago

The issue: We have a site using the WooCommerce Square plugin for a payment gateway that utilize the WooCommerce Plugin Framework. There appears to be an issue where the plugin is using function get_order_with_unique_transaction_ref from wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php to set it's idempotency_key causing double charging in case of false error responses.

Feature Request We suggest adding a function to the frame work to idempotency_key that can be used by payment gateways that support them such as Square.

TimBHowe commented 4 years ago

Hey Been trying to fix the following issues in the WooCommerce Square plugin which uses this plugin framework and thought it would be good to include the generating of an idempotency key here so it can be used in other framework to fix the 2 general problem

https://wordpress.org/support/topic/duplicated-transactions-double-charging-customer/ https://wordpress.org/support/topic/internal_server_error-issues-duplicate-charges-created/ https://wordpress.org/support/topic/idempotency_key-increment-causing-double-charging-in-case-of-false-error-respons/

I have created a pull request https://github.com/skyverge/wc-plugin-framework/pull/492 and haven't heard back and wanted to check in.

unfulvio-godaddy commented 1 year ago

hey @TimBHowe apologies for the terrible delay in replying to you

I see you have closed the PR https://github.com/godaddy-wordpress/wc-plugin-framework/pull/492 after receiving feedback

Is this still an issue?

Thank you

TimBHowe commented 1 year ago

I believe this is still an relevant to add to help payment gateway plugin that use the framework. Unfortunately, I have not had a chance to revisit it