PayPal Express Checkout - Redirect URL - paypal

I want to set up a recurring payment with PayPal.
But when I want to redirect the user to:
https://www.paypal.com/cgi?bin/webscr?cmd=_express-checkout&token=<value_returned_by_SetExpressCheckoutResponse>
I end up at the PayPal.com page, though the correct url is set.
What am I doing wrong?

Looks like there's an error in the PayPal documentation at Integrating Recurring Payments.
At 'Redirecting the Buyer to PayPal' there url is:
https://www.paypal.com/cgi?bin/webscr?cmd=_express-checkout&token=<value_returned_by_SetExpressCheckoutResponse>
When it should be:
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=<value_returned_by_SetExpressCheckoutResponse>
Thanks to Jensen Ching for pointing this out.

Related

Can paypal credit card payment be handled in a hosted page like paypal express?

For paypal express payment (the one pay via a paypal account), I am quite happy to provide a return url and handle the payment in a paypal page. (so the transaction doesn't happen in my site).
If I want to accept credit card payments, I saw some APIs that I can pass credit card number from my site to paypal. Is it possible that I can just provide a return url and go to a paypal page? On that page, my user can type in credit card number and payment details. So I won't have to worry if my site is secure with those financial data.
Many Thanks
Just add the following parameters to your SetExpressCheckout request and I think you'll get what you're wanting.
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
USERSELECTEDFUNDINGSOURCE=CreditCard
Also, make sure you have the VERSION set to 119.0.

PayPal API - How to keep the payment process on my website?

I run a small marketplace with multiple sellers where buyers can buy items and pay with PayPal. The problem is, when someone makes a payment, they are then displayed the "Payment Confirmation" on the PayPal website and are given a choice to either return to their PayPal account, or return to the website.
Is there any way to keep the payment flow on my website, except for the payment part? I notice when buying on Etsy for example, the buyer goes to PayPal to make the payment and is then immediately returned to Etsy for the payment confirmation. They never see the PayPal payment confirmation page.
I assume it could be because Etsy and PayPal have a special arrangement that isn't available to other sites? Or am I missing something in the API?
Right now, with the normal PayPal API, this is what buyers see:
NAME, you've just completed your payment.
Your transaction ID for this payment is: XXXXXXXXXXXXXXXXXXXX.
We'll send a confirmation email to your#email.com
Go to PayPal account overview.
Go back to "seller#email.com".
I can't even figure out how to change the "Go back to..." link to my website name in the hidden fields. PayPal just chooses to display the seller's (the person that received the payment) email address.
Is there any way to at least set a website name for them to return to with hidden variables? Keep in mind that I have different sellers, so it's not something I could set inside each seller's PayPal account.
Thank you :)
I assume you are using Express Checkout with Set/Get/Do EC API integration. Please check the below document for experience options available with Express Checkout API.
https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/integration-guide/ECCustomizing/
The 'useraction=commit' in the PayPal payment auth url triigers the 'Buy' button. If you do not send that request paramter then it will show 'continue' button and you can complete rest of the process on your site.
However, if you are using Paypal Payment Standard product then you need to use Express Checkout to accomplish the outcome you are seeking.

DNN and PayPal, how to sent email to customer after payment has been made

In my DNN website, using Paypal's Checkout button, when user has click the buy button and sent to Paypal. Make a payment and then redirect back to my site.
Question:
How can I get that customer email address (from Paypal) so that i can sent a conformation email to him/her from my DNN website?
thanks.
Two ways; you can either call the GetTransactionDetails API and supply the TRANSACTIONID as a parameter. 'EMAIL' will contain the buyer's (PayPal) email address.
Or you can use PayPal IPN to get notified through POST whenever a payment / action has been made.
GetTransactionDetails API doc is at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_GetTransactionDetails
You can also have a look at TransactionSearch for past transactions.
In case you want to use IPN, just supply NOTIFYURL in your SetExpressCheckout and DoExpressCheckoutPayment call if you're using Express Checkout, or if you're using Website Payments Standard.
Remember to send the POST back to PayPal for validation at paypal.com/cgi-bin/webscr?cmd=_notify-validate and check for a VERIFIED / INVALID response.
Some sample code and docs for IPN is available at https://www.paypal.com/ipn/

Capturing payment; express checkout

Hi
I have paypal express checkout working on my site, when user buys something the transaction goes through and the merchant is able to capture payment by clicking on the capture button on the sandbox site. Problem is that I need 'capture status' returned to the site as I need to store it in database for future use, is there a way that paypal sends some notification whenever the payment is captured by the merchant.
Thanks
PayPal IPN: https://www.paypal.com/ipn
In short, include NOTIFYURL in your SetExpressCheckout and DoExpresscheckoutPayment call and you'll receive a POST on that URL when the transaction has been captured. Look for 'PAYMENTSTATUS', as that should read 'Complete'.
Don't forget to validate the POST by sending it back to https://www.paypal.com/cgi-bin/webscr?cmd=_notify-validate and checking for a VERIFIED / INVALID response.

Shouldnt testing IPN take money from my Paypal sandbox account?

Im trying to set up a PayPal IPN system on my site, but I try to test it in the PayPal sandbox, I think it's not working fine.
I've got a developer account in the sandbox. I've created 2 accounts: buyer and seller. I use the IPN simulator to send a POST request to my page. The request seems just fine, but when I login into the sandbox seller account, the amount of money didnt change. If I login with the buyer account, the amount didnt change either. Shouldnt they change according with the IPN purchase I just simulate?
Also, if I go to IPN record in the paypal account, it's empty.
If I send back the request to PayPal to verify it, I get: VERIFIED from PayPal, so it seems correct.
I post here the POST request Im getting from PayPal:
cmd=_notify-validate
test_ipn=1
payment_type=instant
payment_date=10%3A21%3A42+Apr+03%2C+2011+PDT
payment_status=Completed
address_status=confirmed
payer_status=verified
first_name=John
last_name=Smith
payer_email=buyer_1301850921_per%40my_email.net
payer_id=TESTBUYERID01
address_name=John+Smith
address_country=United+States
address_country_code=US
address_zip=95131
address_state=CA
address_city=San+Jose
address_street=123%2C+any+street
business=seller_1301846568_biz%40my_email.net
receiver_email=seller_1301846568_biz%40my_email.net
receiver_id=M3PZFZDNE3HKU
residence_country=US
item_name=something
item_number=AK-1234
quantity=1
shipping=3.04
tax=2.02
mc_currency=EUR
mc_fee=0
mc_gross=15
mc_gross_1=10
txn_type=web_accept
txn_id=42431721
notify_version=2.1
custom=Los+23+pinos
charset=windows-1252
verify_sign=AGJ1AjjJzH2s7fC2Gg3c.JDtZCK1A.hF6JlaXSYSYzM-krKKk.SLx50l
IPN is not a transactional functionality. It merely allows PayPal to send you a POST with transaction data whenever a transaction has been made.
If you're looking to transfer funds, you'd be looking at either Website Payments Standard, Express Checkout, Website Payments Pro, Paflow Link, Payflow Pro or Adaptive Payments.
I found out that IPN does NOT simulate the transfer of funds, so if you want to test it you need to point your checkout form to the sandbox URL