Web Connection User Discussions
Anyone using WWWC and the Paypal API as of late?
Gravatar is a globally recognized avatar based on your email address. Anyone using WWWC and the Paypal API as of late?
  Michael B
  All
  Sep 25, 2019 @ 06:13pm

Instead of asking a question of everyone I am 'for once' posting something helpful. If you are having trouble getting started with the Paypal API here's something that will get you started.

Obtain your lcClientid and lcSecret from here - https://developer.paypal.com/developer/applications

m.lcBase64 = Strconv(lcClientid + ":" + lcSecret, 13)

loHttp = Createobject("wwHttp")
lohttp.addheader("Authorization","Basic " + m.lcBase64)
lohttp.cContentType = "application/x-www-form-urlencoded"
loHTTP.AddPostKey("grant_type","client_credentials")
lcUrl = [https://api.sandbox.paypal.com/v1/]

_cresult = lohttp.HttpGet(lcurl)

loSerializer = Createobject("wwJsonSerializer")
loResponse = loSerializer.DeserializeJson(_cResult)

This will generate a token for you to use the Paypal API using the WWWC httpget() function.

The loResponse object will contain the 'object of your dreams' - enjoy!

Gravatar is a globally recognized avatar based on your email address. re: Anyone using WWWC and the Paypal API as of late?
  Michael Hogan (Ideate Hosting)
  Michael B
  Oct 9, 2019 @ 12:14pm

Thanks - I think this will be useful for me.

Gravatar is a globally recognized avatar based on your email address. re: Anyone using WWWC and the Paypal API as of late?
  Rick Strahl
  Michael B
  Oct 9, 2019 @ 04:41pm

Michael,

Re: Object of your dreams

I think that depends what the URL is that you're calling at PayPal.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Anyone using WWWC and the Paypal API as of late?
  Michael B
  Rick Strahl
  Jan 28, 2020 @ 04:39am

Rick,

You are right, I just edited the original message.

MB

Gravatar is a globally recognized avatar based on your email address. re: Anyone using WWWC and the Paypal API as of late?
  Rick Strahl
  Michael B
  Jan 28, 2020 @ 12:19pm

Speaking of PayPal - I've been using BrainTree for Credit Card Processing for years, and one huge advantage of BrainTree - being a PayPal company and all - is that you can process PayPal like a credit card. It's just another CC provider. BrainTree handles the PayPal validation flow for you, so your code doesn't have to. PayPal just processes like a credit card - provide a card and paypal as the payment mechanism and the processor handles the rest. All the backend PayPal order access features still are available same as if the orders were processed directly through the PayPal API.

This makes life a lot easier.

+++ Rick ---

© 1996-2024