How to programmatically approve order using PayPal v2 orders API

Viewed 139

I would like to use my sandbox mock customer credentials to programmatically approve 'order with intent to capture' I created earlier using the new v2 orders api.

My end goal is to have an end to end test where an order is created, approved, captured and refunded.

1 Answers

There is no PayPal method for programmatically approving an order. The two methods for approving an order are redirecting a user agent to the approval_url (legacy method), or using an in-context Smart Button (recommended).

Related