I am making a website where we are going to host events and would like a user "USER A" to be able to start an event - enter their paypal account info and set a price. Then other users can register for their event and pay USER A directly, with out us having to process their credit card. We would like users that do not have paypal accounts to be able to pay with a credit card.
It looks like Paypal's Adaptive Payment is the best API for us to use to accomplish this. I have it working in the sandbox environment. My problem is this - a user clicks to register for USER A's event , then they enter all their info (name, address, company, ect.) we need to keep this info in our Database so this needs to be done first. Then they will click on a button that says "Pay with Paypal". This creates a paykey and redirects the user to the Paypal login page where the user has 2 options (a. login paypal or b. enter personal info again and credit card information)
I want to know how I can accomplish having all the fields already filled out in the Paypal page , so the user does not have to enter all of their information again. They will be able to delete data in the text boxes if the billing address happens to be different. But all websites I have ever seen to not make the user enter this information twice if they are identical. Now I know this is possible because I have seen other sites do it. I have looked into SetPaymentOptions API , but it is not very clear how that works , and I need user information to be passed even if they are not known to Paypal already.
I tried adding values as suggested in Paypal tutorials like this
<INPUT TYPE="hidden" NAME="first_name" VALUE="John">
<INPUT TYPE="hidden" NAME="last_name" VALUE="Doe">
<INPUT TYPE="hidden" NAME="address1" VALUE="9 Elm Street">
but that didn't work, Here is the raw data from Fiddler from the request :
POST https://svcs.sandbox.paypal.com/AdaptivePayments/Pay HTTP/1.1
Content-Type: text/xml;charset=utf-8
X-PAYPAL-SECURITY-USERID: scotts_XXXXXXXXX_biz_api1.live.com
X-PAYPAL-SECURITY-PASSWORD: 1344XXXXX
X-PAYPAL-SECURITY-SIGNATURE: AOLbPDojAEUdeQJ3wXagJXkxYeJDARg4IXXXXXXXXXXXXXXXXXXX
X-PAYPAL-SERVICE-VERSION: 1.1.0
X-PAYPAL-APPLICATION-ID: APP-80W2844XXXXXXXXX
X-PAYPAL-REQUEST-DATA-FORMAT: XML
X-PAYPAL-RESPONSE-DATA-FORMAT: XML
Host: svcs.sandbox.paypal.com
Content-Length: 810
Expect: 100-continue
Connection: Keep-Alive
I think for you the problem is not really the login to paypal in a popup, but the paypal registration process to be able to pay with the credit card. There is an api call in the adaptive payment api that allow you to process a registration on the behalf of a user.
You can directly prefil paypal informations on a page using your own design. On submit you create a paypal account using adaptive payment api, and the last step of this process will need you to open a paypal popup which will ask the user to complete his registration by adding a password and credit card information.
After this point you will find back the same payment behavior you have using the simple paypal login.
Please note to even more integrate all your website through paypal you can add preapproval, then the user will only see the paypal website once: when he will accept the preapproval (two steps in a light paypal popup: login > accept).
When the user checkout the first time:
Select between Create an account (using the way I explained above) or Pay with paypal
Create a preapproval key (see the doc on the api, you don't need to know the user paypal login), as returnUrl, specify a url with the local user_id
Open a paypal popup client side using the url returned by the previous step. The user will need to login with his paypal account and then accept the characteristics of your preapproval (limit in time, limit in money)
Paypal will redirect to the returnUrl of step2, it can be a page when you just say "This window will close automaticaly" with a js to close the page
You can now use the preapproval key to make payments on the behalf of the user
When the user checkout after the first time:
Ask for a confirmation "$XX will be taken on your linked paypal
account"
Pay using the preapproval key, and it's done!
Hope it will help!
Offical Response from PayPal:
" Adaptive Payments does not have any feature in the documents which does this. I apologize for the inconvenience this might cause."
I will leave this question open though in case someone has a better route for me to go to accomplish what I have explained in the question.
EDIT:
Incase someone else comes across this , it is offically 100% not possible - I ended up using Express Payment API , using this it is very easy to pass user parameters.
Dont use Adaptive Payment API
Adaptive payments was discontinued as of 01/12/2017 and PayPal Marketplace is the equivalent to adaptive payments.
You can learn more about the Marketplaces product on the PayPal Developer Portal: https://developer.paypal.com/docs/marketplaces/pp4mp/?mark=marketplaces
hello I think following link will help to you
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_APIntro
Related
I'll shorten my question as much as possible.
I would like to know if there is a way for me to avoid to force user to enter his/her credit card number with rest of the CC informations ON MY WEBSITE...???
The PayPal API documentation that I'm currently reading:
https://developer.paypal.com/docs/classic/paypal-payments-pro/integration-guide/recurring-payments/
So basically what it says is:
Include all required credit card information in the CreateRecurringPaymentsProfile request.
And one of the parameters that I would send out from my website are:
1. Card type
2. Card number
3. Card expiration date
4. CVV2
And so on...
This is utterly unacceptable for me because my website doesn't uses the HTTPS protocol and the data traveling from my website to PayPal would be unsafe...
Is their API really this dumb that I can't do a simple recurring payment without sending all this data to them???
Are there any workaround to this ???
I start to working with the Facebook graph API and I have question:
I make Facebook Authentication, so after user approve my application I got accessToken and the facebookUserID. note: The accessToken is expire after One hour(!!!).
Then, in another webpage "index.html", I want to show all the users who approved the application with their full name and profile picture taken from Facebook.
Now I don't understand.. if someone will enter the "index.html" page to see list of users who accepted the application - 5(!!) month after their authentication, when i will make the HTTP call to get thier fullname and profile picture, the accessToken is now expire(a lot time before) so the HTTP call will not succeed.
The last option is to save the full name just in the One hour between user accept the application and before the accesstoken expiration. but if the user will change his name sometime... I don't have the updated Name!
if its important - I'm usind the javascriptSDK with asp.net project.
Please help me to understand how to solve this situation.
It would appear that it is not possible to generate a long-lived token with the JS SDK directly, you will have to involve the server side, see this page for details.
I'm currently integrating the Paypal Express Checkout gateway in one of my website.
I'm using the .NET Paypal SDK (NUGET/Visual Studio 2013). I read Paypal's documentation and followed their guidelines and examples. I was able to get it working (after a little trial and error). But, the thing is, i'm not sure that my flow of operation is optimal. Let me explain the flow:
1) Customer logs in to the website
2) Customer chooses a Monthly plan to advertise on our website and click the paypal button (API CALL: SetExpressCheckout).
3) Customer is redirected to Paypal login page. Enter credentials and logs in.
4) Customer (still on Paypal page) reviews buying informations and clicks 'Continue' button (or Cancel link)
5) Customer is redirected to a Confirmation/Success Callback page on my website (API CALL on pageLoad event: GetExpressCheckoutDetails).
6) Customer (still in Confirmation Callback page) clicks an 'Accept transaction' button (or a cancel button). (API CALL: DoExpressCheckout)
7) Payment is processed and Paypal sends last payment details (status Completed, Pending, etc) to my Instant Payment Notification Callback URL on my website.
Now, the thing is, i've recently bought a digital album on Bandcamp and their flow was different at one part and more concise, and well, more 'express' than mine:
1) Customer clicks Name you price link. A modal opens.
2) Customer enters the amount and clicks the 'Checkout now' button.
3) Customer is redirected to Paypal login page. Enter credentials and logs in.
4) Customer (still on Paypal page) reviews buying informations and clicks 'PAY' button (or Cancel link)
5) Customer is redirected to a Confirmation/Success Callback page Bandcamp website. Payment is already processed and nothing more is asked of the customer.
So the question is how do change the 'Continue' button on Paypal to a 'Pay' button?
I can't seem to find my way on Google to answer this question, nor do i see this flow in my documentation?...
Note that these are both digital goods and no shipping is required.
Thank you!
When redirecting to PayPal add useraction=commit to the URL:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=<TOKEN>
or
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=<TOKEN>
A similar question was asked just a few days ago: Here If you want a more detailed answer you are going to have to post the part of your code where you redirect users to PayPal.
On one of the pages of my DNN website I've set up a BuyNow button inside a HTML/Text module. The button does a POST on submit to the PayPal Sandbox URL. I've also set up a REST based service which PayPal is going to post the IPN information to.
In this service I'm sending a POST with the cmd_notify parameter and get back the information associated to the transaction.
At this point I would like to check whether the receiver_email parameter which PayPal sends coincides with my seller email adress from inside the Sandbox account. However I don't want to hardcode the value for the latter. I've noticed that DNN has a "Payment Settings" section under Admin->Advanced Settings.
[TL;DR]
How can I programatically access the PayPal email address info stored at Admin->Advanced Settings->Payment Settings from back-end webservice C# code? Is this possible?
This is stored in the HostSettings table as a setting key named "ProcessorUserId":
select * from hostsettings where settingname='ProcessorUserId'
Programmatically, if you're inside DNN you can access it through:
DotNetNuke.Common.Globals.HostSettings(KEY)
that is:
string pid= DotNetNuke.Common.Globals.HostSettings("ProcessorUserId");
Hope it helps,
al.
I am trying to integrate paypal gateway in my aspx page having shopping cart. I succeed to commit transaction using express checkout method generated by paypal integration wizard but what I am being unable to do is sending product quantity and details to paypal page.
And how can I redirect to my own review page where shipping and billing address is present after log in into the paypal?
how can i redirect to my own review page where shipping and billing address
First you need to send a unique number id for the order that is connected to your database with the information that you like to show after the purchase.
Then you send the "return" parametre with the full url with the unique id of your order that your customer will return and you need to show the final informations.
eg:
<input type="hidden" name="return" value="https://www.urls.con/orderinfos.aspx?TID=112999182">
of cource for better protection is good to encode some how your order id. All of that exist on the paypal sdk manual.
Also return url are the "notify_url" to be notify even if the user not return, and "cancel_return" in case of cancel the payment
You can also search for PDT for the return, and IPN for the notify for more advanced information.