Skip to content

Instantly share code, notes, and snippets.

@agentcoops
Created August 23, 2015 16:13
Show Gist options
  • Save agentcoops/ec24f824fcdd36bd4963 to your computer and use it in GitHub Desktop.
Save agentcoops/ec24f824fcdd36bd4963 to your computer and use it in GitHub Desktop.
Pharo Stripe Request
| znc response |
ZnNetworkingUtils defaultSocketStreamTimeout: 60.
(znc := ZnClient new) logToTranscript.
response := znc
url: 'https://api.stripe.com/v1/charges';
headerAt: 'Authorization'
add: ('BEARER {1}' format: { <YOUR KEY> });
formAt: 'amount' put: '1000';
formAt: 'currency' put: 'eur';
formAt: 'source' put: <TOKEN>;
post;
response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment