Posting to PayPal

6 views
Skip to first unread message

Mike Gillespie

unread,
Mar 26, 2021, 2:02:17 PM3/26/21
to Houston ColdFusion Users' Group
PayPal is telling me that they are not getting my post data.  Any suggestion on what I am doing wrong here?  Do I actually need to put the JSON data in a cfhttpparam tag?

<cfhttp method="post" url="#variables.apiURL##theQuote.auth_id#/capture" result="ppcapt">
   <cfhttpparam type="header" name="Content_Type" value="application/json" >
   <cfhttpparam type="header" name="PayPal-Request-Id" value="#theQuote.pp_request_id#" >
   <cfhttpparam type="header" name="Authorization" value="Basic #ToBase64(variables.apiClientID & ":" & variables.apiSecret)#">
   {"amount":{"currency":"USD","total":"#replace(decimalformat(totalCost),',','','all')#"},"is_final_capture":true,invoice_id:"#invoiceData.invoice#","note_to_payer":"Invoice #invoiceData.invoice# has been generated, paid and closed for Service #arguments.quotenumber#."}
</cfhttp>

Shane Heasley

unread,
Mar 26, 2021, 9:15:06 PM3/26/21
to hou...@googlegroups.com
That would be one of my initial thoughts, yes.

--
--
You received this message because you are subscribed to the "Houston ColdFusion Users' Group" discussion list.
To unsubscribe, send email to houcfug-u...@googlegroups.com
For more options, visit http://groups.google.com/group/houcfug?hl=en

---
You received this message because you are subscribed to the Google Groups "Houston ColdFusion Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to houcfug+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/houcfug/f97b7f3a-0680-4d3c-954e-c3db3f3400a6n%40googlegroups.com.

Shane Heasley

unread,
Mar 26, 2021, 9:17:24 PM3/26/21
to hou...@googlegroups.com
In the body though, not the header.  On phone, just initial reactions from memory.

On Fri, Mar 26, 2021, 13:02 Mike Gillespie <spi...@gmail.com> wrote:
--

Charlie Arehart

unread,
Mar 26, 2021, 10:08:50 PM3/26/21
to hou...@googlegroups.com
Try putting that content not between the cfhttp tags but in a cfhttpparam with type="body". 

/Charlie

Sent from my mobile device. Please pardon typos. 

Mike G

unread,
Mar 29, 2021, 1:08:06 PM3/29/21
to hou...@googlegroups.com
unbelievable.  In over 20 years of doing CF I have never used type=body for a cfhttpparam - never had to and didn't even consider that it existed or was needed.  I am embarrassed that I did not RTFM for this one.

Thanks y'all

Charlie Arehart

unread,
Mar 29, 2021, 6:04:42 PM3/29/21
to hou...@googlegroups.com

Just doin’ my job, sir. They don’t call me “the CF librarian” for nuthin’. :-)  And even I “still ain’t seen it all” after nearly 25 years. There’s just a lot to it, and the great community behind it has helped us all so very much over the years.

Was nice “hearin’ a peep” out of this group after such a long while. Until again.

/charlie

 

From: hou...@googlegroups.com <hou...@googlegroups.com> On Behalf Of Mike G
Sent: Monday, March 29, 2021 12:08 PM
To: hou...@googlegroups.com
Subject: Re: [houcfug] Posting to PayPal

 

unbelievable.  In over 20 years of doing CF I have never used type=body for a cfhttpparam - never had to and didn't even consider that it existed or was needed.  I am embarrassed that I did not RTFM for this one.

 

Thanks y'all

Reply all
Reply to author
Forward
0 new messages