saucal / woocommerce-gateway-amazon-pay

Amazon Pay Gateway
0 stars 1 forks source link

fix: Cast frequency.value to string #143

Closed dpanta94 closed 2 years ago

dpanta94 commented 2 years ago

All Submissions:

Changes proposed in this Pull Request:

Amazon accepts the recurringMetadata.frequency.value as string. Casting $apa_interval to string ensures consistency. https://developer.amazon.com/docs/amazon-pay-api-v2/checkout-session.html#type-frequency

Closes woo#122.

How to test the changes in this Pull Request:

  1. Install WooCommerce Subscriptions, All Products for Subscriptions and Amazon Pay
  2. Create a simple product with a subscription option configured via All Products
  3. Enable logging for Amazon Pay
  4. You should be able to complete your transaction without warning or fatal in the logs.

Other information:

Changelog entry

Fix - Cast recurringMetadata.frequency.value to string before passing it to Amazon API.

dpanta94 commented 2 years ago

opened in woo repo pull#161

dpanta94 commented 2 years ago

accepted in woo repo