Alex Rivera | Logout

How to create Encrypted PayNow button "on the fly" for Third-party customers, using Paypal NVP API?

Asked 2012-03-30T09:03:27.770
8

I need to create Encrypted "PayNow" paypal buttons on the fly for a website.
I read all the documentation I can find on the paypal website.
I understood that I need to use the BMCreateButton ButtonManager NVP API.
But I've been unable to find any information, nor any reasonably simple and documented sample code, about HOW I'm supposed to call these API.

Do I need to put my parameter in a form and post it on some kind of server?
Do I need to put all the parameter on an url, call this url, ad use the result?
How do I authenticate to this service?
I'm going to create encrypted paynow button for different paypal business account.

Can someone show me some VB.Net or C# code that actually call this BMCreateButton NVP API?
So that I can see:

  • how to do the call
  • how to authenticate to the service
  • how to format/use the parameters of the API call
  • how to get the results

Various link to useful resource
- Thanks to this answer I've been able to find some useful sample code here and there about how to call Paypal API.
- Here is more usefull information about how paypal NVP API works.
- Here an interesting website that generate API Call URL for the BMCreateButton API
- Here

Edit
Report

1 Answer

9

Ok, finally I got it! :-)

My objective is to create Encrypted PayNow buttons "on the fly" for some of our customers. Here is a brief explanation of how PayPal API works with Third-party access.

  • Create a Paypal Sandbox account (here)
  • In this sandbox account, create 2 new business account
    you should hook these business account to a credit card. This will mark these account as "verified", unless it won't work
    • The first account (account A) will represent our company
    • The second account (account B) will represent one of our customers
  • log in account A, and request the API credentials (instructions here)
  • log in account B, and grant API permission to account A (instruction here check the paragraph "Third-party authentication: Grant your cart the appropriate API authentication permissions")
  • grab the Api credentials of account A, and put them in your source code
  • grab Merchant ID and merchant Email of account B and put them in your source code
  • run the code
  • grab the returned html, put it on a web page, and test it, it should works
    (you need to be logged on your paypal sandbox account, or the generated button wont works)

Why this simple and concise knowledge is timewastingly scattered among a countless number of PayPal help pages, PayPal PDF manuals, and third party blog post, is beyond my understanding :-) Anyway...

Here is the working code in VB.Net

Public Shared Sub PaypalThirdPartyPayNowButtonTe
answered 2012-04-05T14:06:32.997

Your Answer