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

Add shipping_address to the API request when the default shipping_address is the billing_address #97

Merged

Conversation

baka-san
Copy link
Contributor

@baka-san baka-san commented Jan 17, 2024

Context

RPD.Hosting.-.Google.Chrome.2023-11-16.13-34-36.1.mp4

Paidy payments done via Woocommerce for physical_goods MID are not working. We are getting error 422 from Paidy with "payment_data[shipping_address]" is missing. This means that all physical goods MID merchants using Paidy for payments via Woocommerce will have failed payments.

This PR adds the shipping_address to the API request when the default shipping_address is the `billing_address

Fixes: https://app.asana.com/0/1203431131393579/1205964261339053/f

Test instructions

Setup

  • Follow this to setup local Woocommerce.
  • Configure Woocommerce Komoju settings to connect to degica-mart of a local instance of HATS by setting the KOMOJU Endpoint.
Screen Shot 2024-01-18 at 14 49 35
  • Configure degica-mart to use Paidy 1 gateway.
  • Configure Paidy 1 to be a Gateway Type of physical_products

Test steps

Woocommerce.Paidy.bug.fix.mov
  • Add a product to your cart and go to the checkout page.
  • Fill in your billing info and select Paidy at the bottom.
  • Proceed with the payment. You should be redirected to the hosted page.
  • Proceed with the payment. A Paidy screen should pop up asking for information. This is good enough, you don't need to complete the payment.

@baka-san baka-san changed the title Send shipping_address to when the default shipping_address is the billing_address Send shipping_address to the API request when the default shipping_address is the billing_address Jan 18, 2024
@baka-san baka-san changed the title Send shipping_address to the API request when the default shipping_address is the billing_address Add shipping_address to the API request when the default shipping_address is the billing_address Jan 18, 2024
Copy link
Member

@Resonious Resonious left a comment

Choose a reason for hiding this comment

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

This looks great. Very nice find. Not sure how long it would've taken me to figure this out 😅

@Resonious Resonious merged commit 6586adc into master Jan 18, 2024
4 checks passed
@baka-san
Copy link
Contributor Author

@Resonious the hard part is that my changes weren't taking effect and I had no idea what was going on. I also couldn't debug or produce logs lol

I ended up having to run docker-compose up --force-recreate. I updated our docs https://www.notion.so/WooCommerce-Testing-Demo-9bbada14ee314a379e141f8d512dde4f

I also don't know why, but logs are not produced even when checking the 'Enable logging' box as described in our docs 🤔

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.

2 participants