简体   繁体   中英

Which Paypal API Should i use to pay our employee's?

We are building a system in our intranet to easy and quickly pay to our external employees for their monthly services, the quantities to be paid change every couple of weeks.

According to this Question we have mainly two options to pay to our employees

  • Mass Payments : We can't use it because we dont get the minimum required amount of money yet
  • Adaptive Payments

So we choosed the second one, We took the adaptivepayments-sdk-php and decided to use the simplest way to perform a payment from our own account to a person having a basic paypal account by email, here's the code to do that:

 #Create Request
 $receiver = new Receiver();
 $receiver->email = 'the.employee.email@example.com';
 $receiver->amount = '10';
 $receiver->paymentType = 'SERVICE';

 $receiverList = new ReceiverList($receiver);
 $cancelUrl='...';
 $returnUrl='...';
 $payRequest = new PayRequest(new RequestEnvelope("en_US"),'PAY', $cancelUrl,'USD',$receiverList,$returnUrl);
 $payRequest->feesPayer = 'SENDER';

 #Send Request
 $service = new AdaptivePaymentsService();
 $response = $service->Pay($payRequest); 

Would this be the correct approach for our needs? or is there a much simpler solution for this?

To use Adaptive payments you need to request an APP ID to paypal on its www.x.com website, the problem is that they ask for TEST URL/USER/PASS and we just can't give away permissions to get into our intranet per our company policy, also i'm not sure if our 'application' is within their guidelines

Any help would be much appreciated, i feel a bit lost here,

Thanks

Mass Payments would be the easiest route to go. There isn't a minimum money requirement and only the following need to be met:

***Note: The criteria may be changed in the future.

If you meet all of the criteria above give a call to PayPal support at 866-837-1851 and request Mass Payments be enabled. Even if you send one payment, Mass Payments will be able to facilitate it.

If Mass Payments is not an option then yes Adaptive Payments is the route to go. You'll want to apply for implicit payments so a payment will be sent with each API call. This is a more complicated route but once implemented it can be be used in a very efficient manner.

As far as the testing environment, PayPal will need to see the application to ensure it's in compliance with their rules and regulations. If it's possible I'd recommend having an external site with a simple interface on how you plan on using the API. PayPal having access the the intranet is not a requirement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM