paypal icon indicating copy to clipboard operation
paypal copied to clipboard

Create order body schema now uses payment_source

Open Roolps opened this issue 1 year ago • 3 comments

https://developer.paypal.com/docs/api/orders/v2/#orders_create

Paypal has altered their create order endpoint to take a payment_source object and has depracated the payer object.

https://developer.paypal.com/docs/api/orders/v2/#orders_create!path=payer&t=request https://developer.paypal.com/docs/api/orders/v2/#orders_create!path=payment_source&t=request

Roolps avatar Feb 15 '24 13:02 Roolps

Ah turns out error was not because of this, but they indeed have udated their docs to use payment_source and deprecated payer. Should I leave this open?

Roolps avatar Feb 15 '24 13:02 Roolps

@Roolps feel free to create a PR to make it up-to-date.

plutov avatar Feb 15 '24 13:02 plutov

Would you prefer if I remove the 'payer' parameter and replace this with payment source, or add the payment source as well as the payer?

https://github.com/plutov/paypal/blob/master/order.go#L28

I'll also add all of the payment sources listed in the docs that aren't already there https://developer.paypal.com/docs/api/orders/v2/#orders_create!path=payment_source&t=request

Roolps avatar Feb 20 '24 10:02 Roolps

@Roolps feel free to continue, we can keep both payer and payment source.

plutov avatar May 27 '24 10:05 plutov