Paypal no BUTTONSOURCE in return URL - paypal

I'm trying to integrate booking system everything was fine in posting and other flow. But after paypal payment page and return to my url BUTTONSOURCE was empty.
any suggestion?

Did you include it in both DoExpressCheckoutPayment as well as SetExpressCheckout?
BUTTONSOURCE must be included in both.
Although you'd probably be better off using CUSTOM or INVNUM if you want to use it to link orders on your end together with PayPal transactions.

Related

PayPal Adaptive Payments return URL parameters

I'm using PayPal Adaptive Payments (a deprecated integration method) with PHP.
When calling the "Pay" request, I always used to set the return URL to:
https://my-website/my-return-page.php?payKey=${payKey}
Then, when the payment is succesful, PayPal should redirect the user to something like:
https://my-website/my-return-page.php?payKey=AP-ABCDEF123456
But now, the PayPal API is throwing an error:
The URL https://my-website/my-return-page.php?payKey=${payKey} is malformed
There was no change in our end, it just stopped working.
I need the payKey in the return URL, so I can check the paymentDetails.
adding &payKey=${payKey}
Oh, based on the answer you linked you were sending that actual text as-is and PayPal was dynamically replacing that with the value.
It doesn't seem that syntax is supported anymore; it's not documented.
What I would recommend is generate your own unique ID, and pass that as ?id=abcde12345. Then when you first get the payKey from the initial Pay API response, associate this payKey with your own id (e.g. abcde12345). It could be the same as the TrackingID or Invoice ID, if you happen to use either parameter/feature of Adaptive Payments.
Then, the return should have ?id=abcde12345 and you can look up the payKey and proceed from there with paymentDetails.
You can also report this change in behavior with Adaptive Payments as a PayPal bug, but since it's a very old and deprecated product that's likely to be sunset at some point, I'm not sure how much traction re-implementing an undocumented feature would have, so the above workaround of your own id seems like a better plan.

How use PayPal API Request Money?

I need to use Request Money by PayPal. I have problem with find the best Paypal API (SOAP/REST) for this. After that i need sometimes refund this transfer.
Can somebody help me to ?
I want to see if there is a way to automate the PayPal request money part.
This is a PHP web application.
A sample payment link :
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=YOUR_PAYPAL_EMAIL&amount=10&currency_code=USD&item_name=test
Edit the value of each variable and you would be able to generate a payment link on your demand. You may also check below link for more details of PayPal Payment Standard 's variables.
https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
You can send PayPal Invoices to people using the Invoicing APIs. For that you may be interested in our PayPal class library for PayPal, which makes those API calls very quick and easy.
Alternatively, you could build a more simplified money request by just generating a PayPal Standard payment URL using the variables outlined here. Then you could have that URL be a link from any button or trigger you want.

Which paypal solution to use?

I just noticed that paypal now has a number of solutions to accept payment, and per this own page, it doesn't really compare their difference in a nice way:
https://developer.paypal.com/docs/accept-payments/
Does anyone happen to know (I am using C#/.net, but JS is also OK), if I want to have a customized checkout, in which I can customize the look and feel, and allow customers to enter/select shipping address (which is saved in the site's own database), which paypal method I should use?
Thanks! (also if any document that explain better the differences of the above different ways of accept payment, it would be great!)
If you want to completely customize everything then the PayPal Payments Pro Payflow Edition is a viable solution.
Here is the link to Sample Code C# is one of the programming languages offered in the Sample Payflow Code.
You will need to build your form/shopping cart and then the Sample Code can be used to make the payment request to process the payments. The Entire Transaction will take place place on your website from start to finish.
If you want PayPal to handle the payment portion with a customer leaving your site to use PayPal as the Payment method and then returning to your site to complete the payment, Express Checkout is the other option that will work.
You can make an API call to PayPal to get the Shipping information from PayPal and then store the shipping info in your own database.
Here is the Express Checkout Sample Code

paypal integration types confusion

I new to paypal integration in asp.net . I found very difficult to understand the paypal api .
I under stood two types -
inline html form ( i.e is also called buy button )
payflow api
my questions are :
which one must be used for recurring payment ( subcription packages for end user)?
in first type , few sites suggested to use IPN for confirmation of payment. I want to know is it neccessary since without using IPN, also using notify_url we can confirm the payment success (as per my knowledge notify_url returns to your site when payment is completed at paypal site)?
for recurring payment , do i need to store user account details (i.e credt card or paypal account ) in my databas?
please do reply with you suggestion .
Thanks
1) You can do it with both, actually. If you want to stick with basic HTML forms then you'd be using Payments Standard, and they call it "Subscriptions". You can easily create a Subscription button from within your PayPal account.
If you're using the API then they call it Recurring Payments (or Recurring Billing). You would use Express Checkout for the PayPal signups, and Payments Pro if you want to handle credit cards directly on your site without any redirect to PayPal.
IPN is useful regardless of what integration method you're using, however, don't get it confused with PDT. PDT sends data back to your site's thank you page, or whatever final page you setup for it, and it only works with Payments Standard. When PDT is configured on Payments Standard, even with Auto-Return enabled, there is no guarantee the user will make it back to your return URL. IPN is very similar, but data will always be POSTed to your IPN listener regardless of whether or not the user makes it back to your site.
You'll also want to use IPN to handle updates for future payments on a subscription / recurring profile. For example, the actual payments, cancelations, suspensions, reactivations, etc.
The notify_url parameter you mentioned is used for IPN. Again, though, this is separate from PDT. A common mistake I've seen many times is when people have their PDT and IPN both set to the same URL. Then when people do make it back to your thank you page, the code actually runs twice. Once from the user actually hitting it, and once again from PayPal's IPN server hitting it. So make sure to avoid that sort of thing.
3) No, you will never save credit card details to your server. The subscription / recurring system handles that using the data that PayPal saves on their servers.

Paypal doesn't send an answer to the return url

I have a strange problem, my paypal applications functions perfect with my sandboxbusiness paypal account but if I use a different bussines account, paypal calls my return URL after payment but with no answer string.
no error, no problems during payment process, simply there's a blank answer string. I'm not using AUTO RETURN, the customer must click on the return back button after payment.
someone can help me?
What method are you using using to return data back to your page? Are you using the variable "rm" or are you using PDT? Your other account may not be set up the same way as your other one that is working. If you are using PDT make sure that you have PDT setup the same on the other account and etc.