Ez paypal plugin

Hello,
I’m trying to integrate Paypal to do the followings:

  • connect a seller with their PayPal email or Id
  • make payments
  • payout the seller
  • refund

I found this great plugin Ez PayPal Pay by @eazycode which I think does exactly what I need.

I made it work for the payments, which is super simple, I cannot make it work for the others.

Is there anyone who has used this plugin before and can help?

hey @paridegiancaterino , in paypal documentation there are many test(demo) accounts, one is for “admin”, others are for conected sellers. For better uderstanding how to help you, can You discribe what and how You wish to implement it. Let say it is Market place. Every seller has his own account for selling stuff, Users buy from seller’s shop, money goes on market place, and after deal completed, market place Payout a seller minus percent of platform. In this case You must setup You PayPal bussiness account as main, and behave on his behalf

Hi @eazycode ,
Thank you for your reply.

It’s a freelance marketplace, 3 users type: Client (buyer), Freelancer (seller), and Admin. The client post a job request and the freelancers can make proposals. This is the scenario:

  1. The freelancers create or connect their Paypal account to their web app account page, letting the admin know that they are ready to work. (I have a Paypal business account, not a Partner program)
  2. The Client posts a job and freelancers make the offer on it.
  3. The Client chooses one of the freelancers and pays in advance (money goes to the Admin account)
  4. Once the job is approved by the Client, the money is released from the Admin account, minus a fixed commission (payout)
  5. If the collaboration fails, the Admin return the money to the Client

Figures are shown and calculated on the webapp so that the client sees the freelancer fee+admin fee
Example:
The freelancer sets their fee, say £100, and the admin fee is £50. The client sees the freelancer+admin fee £150
At the job completion, the freelancer receives £100, the admin keeps £50.
If the collaboration fails, the admin returns the money to the client, fully or partially (manual refund)

I’m not sure I’m setting the initial plugin parameters correctly, there are a few strings, TEST and dev which confuse me.

In the workflows these are the errors that are returned.



Thank you for helping

hey @paridegiancaterino, Thank You for description! First of all You must complete paypal keys in Client ID TEST and SecretID TEST ONLY for SandBox, and try Your Business Logic

HI @eazycode ,
That works really well now, thank you.

The only thing that gives me still an error is the register link, but from the error code, I see that is an API for the partner program. Does that mean I need to get PayPal approval first?
Or in alternative, can I prompt the seller to put their ID or email, and pre-charge something very little like 1 cent?

Also, is there a way to write in the database the transaction ID after the payment, in order to dynamically re-use it in the refund?

Last, the payment button iframe is cut when expands


this makes it difficult to insert the card information.

Thank you

hello @paridegiancaterino, I am glad that You resolved first question! )

  • Register link only redirects seller to PayPal for registration(seller makes registration on PayPal side) and after registration, seller has registered email that will enter to Your platform.
  • You have triger event PayPal Buttons Receive Payment, after it fires You have posibility to store “Captured ID”.
  • About cutting iFrame. PayPal sdk realy don’t likes groups that can be resized(responsive engine), so You can make fixed group with bigger height for mobile devices

Hi @eazycode
Thank you for the information, I have sorted most of them.

I have other questions if you don’t mind.
I need the seller to provide their email address for payouts, but as it’s triggered automatically, I need a way to verify that the email address is correct and valid.
How can I do that?

I tried to set the payout for decimal values, less than 1 but I get error. How can I allow to payout for example 0.01?

Thank you

Hi @paridegiancaterino , I finally found in PayPal documentation, that minimal amoun for transaction is 1$. What bank accounts and debit cards are eligible for Instant Transfer?

Hi @eazycode ,
Thanks for looking into that, much appreciated.

I found an alternative way to verify the credentials for the payouts, is called AAC payouts.
https://developer.paypal.com/docs/payouts/standard/login-with-payouts/