craftcms / commerce-paypal-checkout

PayPal Checkout gateway for Craft Commerce.
https://plugins.craftcms.com/commerce-paypal-checkout
MIT License
5 stars 10 forks source link

Unable to process partial payments #83

Closed ryssbowh closed 8 months ago

ryssbowh commented 8 months ago

Description

I'm working on a website that needs to take partial payments through Paypal. We have orders that are paid for, then an extra charge is added to it by an admin, and users need to pay the balance on the frontend.

We're getting a code 422 DUPLICATE_INVOICE_ID from paypal : "Duplicate Invoice ID detected. To avoid a potential duplicate transaction your account setting requires that Invoice Id be unique for each transaction.".

Since the invoice id is the order number it makes sense, we did send a transaction with the same invoice id on initial payment.

I'm surprised to not see any instance of it in my searches, maybe I'm missing something obvious here ? Or does that sound like an issue in the plugin itself ?

Any pointers appreciated !

To Reproduce How, and what happened?

  1. Pay for an order
  2. add a charge to the order
  3. Try to pay again

Additional info

ryssbowh commented 8 months ago

I did miss something obvious : https://wordpress.org/support/topic/error-what-is-the-next-step-to-fix-this/

You have to go into your PayPal account settings (don’t remember where exactly) and disable “prevent duplicate transactions”