Created
July 4, 2021 13:13
-
-
Save trycf/0c2672ac4a02d4c52d1e3ee1c9a408e7 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
original = { | |
'payment_method_types' = ['card'], | |
'line_items' = [ | |
{ | |
"price_data" = { | |
"product_data" = { | |
"name" = "Something" | |
}, | |
"currency" = 'gbp', | |
"unit_amount" = 123 | |
}, | |
"quantity" = 1 | |
} | |
] | |
}; | |
writeDump(var=original, label="Original"); | |
wantedResult["payment_method_types[0]"] = 'card'; | |
wantedResult["line_items[0][price_data][product_data][name]"] ='Something'; | |
wantedResult["line_items[0][price_data][currency]"] = 'gbp'; | |
wantedResult["line_items[0][price_data][unit_amount]"] = 123; | |
wantedResult["line_items[0][quantity]"] = 1; | |
writeDump(var=wantedResult, label="Want this:"); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment