Here is what I use.

- Gabriel

<!-- Create struct to hold values --->
<cfset responseStruct = structNew()>

<!--- Treat the string as a list delimited by ampersands --->
<cfloop list="#nvpString#" index="aNVPPair" delimiters="&">

            <!--- Treat each pair as a list delimited by equal signs. The
key is the first position and the value is the second position --->
            <cfset aNVPPair_key = listGetAt(aNVPPair,1,"=")>
            <cfset aNVPPair_value = listGetAt(aNVPPair,2,"=")>

            <!--- URL Decode the individual values --->
            <cfset aNVPPair_key = URLDecode(aNVPPair_key)>
            <cfset aNVPPair_value = URLDecode(aNVPPair_value)>

            <!--- Add these items to the response struct --->
            <cfset structInsert(responseStruct,aNVPPair_key,aNVPPair_value)>

        </cfloop>


On Tue, Apr 27, 2010 at 6:23 PM, Matthew P. Smith 
<[email protected]>wrote:

>
> Response from paypal api:
>
>
> TOKEN=EC%2d56976134UR2195446&TIMESTAMP=2010%2d04%2d27T22%3a22%3a01Z&CORRELATIONID=e719ae821503c&ACK=Success&VERSION=60%2e0&BUILD=1268624
>
> What is the easiest/best way to get each of these values?
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333175
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to