I have a page on my site which sends out payments to more than 1 person. I've been testing this using the paypal sandbox account with a few test accounts.
I am also using ipn to get feedback from paypal when payments are complete, pending etc.
My question is, paypal sends me back info via ipn for just 1 of the payments. Why is that? When I check the payment amount in the ipn, it only shows me the payment for 1 of the people who got paid. For example:
If I pay person 1 and 2, where each person gets paid $10 each, so a total of $20. The ipn page only shows me the details for person 1 and says that the payment amount was $10, when the total payment amount is $20.
This is causing me a problem because I need to know that both payments were successful via ipn. At the moment I can only check the payment for 1 person at a time, even though I am paying 2 people at the same time.
How do I get payment for both people?
#Pete answer is a violation of the Paypal User Agreement (unless you have a separate legal entity for both accounts)
9. Restricted Activities
9.1 Restricted Activities. In connection with your use of our website, your Account, or the Services, or in the course of your interactions with PayPal, a User or a third party, you will not:
a. Breach this Agreement (including, without limitation, opening multiple PayPal accounts or breaching the Card Processing Agreement, the Acceptable Use Policy or any other agreement that you have entered into with PayPal (including a Policy));
What you are looking for is PayPal Adaptive Payments. A note about this though: one account - probably you as the application owner - must have a PayPal business account. The others that receive a payment only need a personal account.
PayPal provides an SDK with samples for the Adaptive Payments on Github. Select Adaptive Payments from the menu on the left. There are samples for multiple languages that should be able to get you started.
My hunch is that IPN is tied to the individual account, not the payment, and you have the IPN set up from just one of the accounts. I think what you need to do is configure the IPN on both accounts and then process the response from PayPal two times... once from the IPN notification of the first account, and once from the IPN notification of the second account.
Related
I've integrated the PayPal payment gateway, but now I need to know whether PayPal can handle the below scenario.
Let's say a customer pays $1000 which includes a non-refundable $100 application fee. Later the customer cancels and receives $800 as there is also a $10 cancellation fee, so the formula looks like:
$refund_amount($800) = $total_amount($1000) - $cancellation_charge($100) - $application_fee($100)
So now my business account has balance of $200 and I want to transfer cancellation_fee($100) to my service provider's PayPal account and want to keep application_fee($100) in my account. This transfer is the step I need help with.
Initially all payment has been received by the app owner account and later if the customer cancels or completes the booking amount must transfer to the provider's account (minus the $100 application fee)
I have gone through some PayPal API docs but was unable to find any solution for the transfer.
I'm using the paypal/rest-api-sdk-php library in Laravel.
For receiving payments, do not use the v1 PayPal-PHP-SDK; it is deprecated. Use the cureen v2 Checkout-PHP-SDK. Implement two routes on your server, one for "Set Up Transaction" and one for "Capture Transaction", documented here: https://developer.paypal.com/docs/checkout/reference/server-integration/
For the payer to give their approval, pair your two routes with: https://developer.paypal.com/demo/checkout/#/pattern/server
For automating sending payments from one of your accounts to another account, use the Payouts-PHP-SDK. The account sending payments will need to be approved for PayPal Payouts. See here regarding requesting approval: https://developer.paypal.com/docs/payouts/integrate/prerequisites/#get-access-to-paypal-payouts
I have several ambiguities in using paypal methods and cases, when IPN messages are sent. Im developing app, in which im using paypal(sandbox) for making deposits and cashouts. Each of these both transactions I want to log in my app and here some obscurity raises becouse I need to capture as many cases that may occur. So I'll take it gradually and I'll be thankful also for each partial response.
Firstly, I have some general questions:
In my app, im using BuyNow button, AdaptivePayment methods PAY and PaymentDetails and Merchant method GetTransactionDetails. Are these methods part of Bussines account and for free (there are no monthly fees) right? I cant afford to pay some monthly fees from begining.
May arise any problems, when i'll deploy it to non-sanbox environment?
cashout
For cashout Im using Adaptive payment PAY method.
When My app client make a cashout to his/her paypal account, I can catch through IPN message, that payment is completed and using AdaptivePayment PaymentDetails method and Merchant GetTransactionDetails method I can find out, that there is pending status with paymentreview reason. So on receiver side, where I dont have access, is payment review possibility. Thus receiver can DENY payment and here is a question, how to get information about this user action, becouse an IPN message doesn't come.
Another case that im facing is when client of my app make cashout to
his/her bussines paypal account with different currency from sender
(my bussines paypal account). There is pending status too, but with
reason "multicurrency" in IPN message. Here is similar problem to
previous point 1)... again, I cant get IPN message, which
determine, if user accepted or not the transacion.
deposit
For deposit Im using PayPal standard Buy now button.
PAYER SIDE(my app client): I dont understand, why there is payment
review (accept/deny) in payer account profile, when status of
payment is completed? Is it common behavior only in sandbox
environment? Or is it possible accept/deny payment on payer side in
non-sandbox?
RECEIVER SIDE(my bussines paypal account): There is payment review
too, on receiver side, and if im right, these links (accept/deny)
are similar to links on payer side, arent? There is refund
posibility too, exists some API method to refund programatically?
Correct, each of the products you mentioned do not have a monthly fee.
If a user accepts or denies a pending payment that would trigger another IPN with the completed status. Are you saying you've tested this specifically and you're seeing otherwise?
Receivers would only have to accept/deny in cases where there is currency conversion or maybe they have fraud filters set to flag specific transactions, etc. In most cases there should be no review necessary.
I'm just starting out with Paypal, so this is a newbie question.
I've been going through the instructions for setting up Paypal subscription service, but I think I'm looking at the wrong thing.
What I want to acheive is to get back some kind of response from Paypal so that I can update the database on my web site to mark a registered user as having paid. Basically I have a flag in the database that says if the user is subscribed or not. I want to ensure that the user is marked as paid so long as their Paypal subscription is maintained.
While the instructions linked above do say how to set up a button to receive a payment, there's nothing there about getting any data back from Paypal.
I know there are terms like IPN and sandbox that are related to what I'm trying to do, but I can't find clear instructions for how to get started on this process. I'm just circling around and not getting anywhere.
Where do I start on setting this up? Where is there a clear beginner's tutorial?
Also, I'm using PHP/Javascript/MySQL on my website.
PayPal's IPN service is what you want to use. I've used it myself to do just what you're looking to do.
Instant Payment Notification (IPN) is PayPal's message service that
sends a notification when a transaction is affected. Once IPN is
integrated, sellers can automate their back office so they don’t have
to wait for payments to come in to trigger order fulfillment. IPN can
send notifications for these transactions:
Instant payments, including Express Checkout and direct credit card payments
eCheck payments and pending, completed, or denied status payments
Pending payments
Recurring payments and subscriptions
Authorizations
Disputes, chargebacks, reversals, and refunds
You can also view notifications on PayPal’s IPN History page and
resend them if you need to. As PayPal’s interface for handling
purchase confirmation and server-to-server communications, IPN can
also be used to manage and customize a variety of APIs and
communications, including:
Customize your website's response to customer purchases in seconds
Track customers via IPN "pass-through" variables
Notify sellers who deal mostly in software downloads and other digital, online goods
Track affiliate sales and commissions
Store transaction information in your own database
For more about IPN:
Technical Overview (link to new html version of docs on developer central)
Instant Payment Notification Guide (PDF)
Code Samples
I'm not sure if its the same thing, but I just setup my friends website with Express Checkout, and I wanted to add all paid orders to an orders table in my database.
After I call SetExpressCheckout, and the user is returned to my site after going through the purchase flow on Paypal's side,
I used the information from GetExpressCheckoutDetails.
Then, if DoExpressCheckoutPayment
is successful (also called from the "callback" page) I then do the appropriate work in my database as far as logging the order details. For you in this case, it could be updating a record for the user in the database.
Hope that helps a little.
I have integrated standard paypal with one of sites and it works as follows: user selects which subscription to buy, he is redirected to paypal, paypal sends IPN response, I process it and then every X days PayPal sends a new IPN notifying site that user has been successfully charged for new subscription iteration. Now the problem is that user needs to have paypal account to sign up for such subscription.
The customer contacted PayPal and found out that it is possible to avoid having user to use their PayPal account to buy subscription when seller uses paypal pro account. Is it really so? Will I be able to gather user's card info, then send some request to PayPal API and have the subscription created. If yes, what will happen next? PayPal will be sending me IPN requests every X days notifying site that the card has been successfully charged?
Also, what is the general flow? Do I always have to gather card info and send it to paypal api or can I redirect user to paypal in a similar way as standard paypal functions?
Yes, this is possible. You would need to sign up for PayPal Website Payments Pro and Direct Payment Recurring Payments. You can then use the CreateRecurringPaymentsProfile API and specify the card details directly in a single API call.
This will create a recurring profile, which is billed every X days / months, depending on what you specified as the billing period in CreateRecurringPaymentsProfile.
Alternatively, you can also sign up for PayPal Premium Services (for the UK) or PayPal Enhanced Recurring Payments (for the US). This allows you to accept subscription payments from guest users, using the exact same integration you have at the moment, except a 'guest payment' section will be added to the PayPal checkout screen, so buyers won't be forced to create a PayPal account to sign up for your subscriptions any longer.
(Note: Enhanced Recurring Payments / Premium Services has other benefits as well, such as Installment Plans, but guest subscription payments is definitely the biggest benefit).
I'm working on a project where users will be allowed to send donations among each other.
I'd like to integrate it with Paypal instead of reinventing the wheel and building my own donation system, but due to the nature of the system, I will need to verify that a donation of X dollars was sent from person A to person B.
Is this possible with Paypal, or am I out of luck?
You will need to look at PayPal Instant Payment Notifications (IPN).
Within the call to PayPal to handle the donation/payment, you can specify the URL for a "Listener", which is a script which will be contacted by PayPal with details on the payment, and can then authenticate that payment against PayPal to ensure that it is accurate/confirmed/not faked.
Within the data passed back to the Listener is the email addresses of the Payer and the Payee, along with the amount paid, fees charged, etc.
If you are acting as an intermediary to the two parties, and so long as the payment are made through the form/site you control, then you should be able to use the IPN to get details of those payments and then use that data however you wish to.