cancel
Showing results for 
Search instead for 
Did you mean: 

Order API for approved

Options
misalbhimani
New Community Member
Posted on

How can i approve order by using API ?

4 REPLIES 4

Order API for approved

Options
MTS_Andre
Moderator

Hi misalbhimani, my understanding is that you would like to create orders via REST. You can then create an order which receive immediately the payment or authorizations (which you need to accept before to get the payment).

You can find here all the necessary documentation.

Order API for approved

Options
djenka
Contributor

Hi, the question was "Is there an Approve API", ie how can we simulate customer going through smart payment. I could not find one, and it is indispensable. Otherwise one could try a phantomjs or something, but I could not get it working with paypal. This is a huge show stopper for automated testing. A hint of a solution would be much appreciated.

Order API for approved

Options
MTS_Andre
Moderator

Hi, if you want to simulate the SmartPaymentButton you can create a Sandbox REST App and use that Sandbox client ID into the button:

script src="https://www.paypal.com/sdk/js?client-id=_MY_SANDBOX_CLIENT_ID

 

Once your Smart Button is set to Sandbox then you can use a Sandbox buyer account to simulate payments. Once completed the test session you can just replace the clientID with a Live one.

 

But this is a manual test. If you need to automate a testing session then you need to build it externally from the PayPal API.

Order API for approved

Options
djenka
Contributor

Thanks for the reply. Yes, that was my understanding. I've done that and browser interaction is fine, however I never managed to get it going with phantomjs. Don't get me wrong, but having an approve endpoint does not sound like a rocket science, other payment agents have a straight forward solutions that make life so much easier.

Cheers, Srdjan

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.