They avoid merchant charges, making processing much cheaper for non-card transactions.
Michael
www.WebConnectionHosting.com
Have you made any progress with this?
I just started playing around with stripe in WConnect and have not yet managed to get a charge processed.
I've tried sending the parameters both as a JSON object and in the querystring but I don't have them right yet.
Curious to see how you made out.
Carl
I'm having a little trouble completing transactions using Stripe for my payment processing. Has anyone implemented their API into WebConnect or desktop app already?
They avoid merchant charges, making processing much cheaper for non-card transactions.
I had an email dialog with them to pin down the details. Turns out it's a two step process:
- Use the provided javascript code to gather cc info and get a 'card token'. This appears to be in the API as 'Create a Card Token'.
- Use the token in step one to get a 'Charge Code', while being sure to set "capture: true". This is what you are calling 'Create a Charge'.
Alternatively, you can set "capture: false" and then Use the charge code in step two to complete the transaction.
I have not gotten back to implementing what I have learned, but I'll be happy to share the code once I do. Please do the same for me if you do it first. I was using Authorize.net until recently so it's just a matter of retrofitting the stripe API.
Michael
Hi Michael,
Have you made any progress with this?
I just started playing around with stripe in WConnect and have not yet managed to get a charge processed.
I've tried sending the parameters both as a JSON object and in the querystring but I don't have them right yet.
Curious to see how you made out.
Carl
I'm having a little trouble completing transactions using Stripe for my payment processing. Has anyone implemented their API into WebConnect or desktop app already?
They avoid merchant charges, making processing much cheaper for non-card transactions.
Michael
www.WebConnectionHosting.com
Here's what I've got so far.
I copied this sample HTML code into an HTM file.
All I had to do with this for testing is to insert my actual publishable key in line 15 - Stripe.setPublishableKey('YOUR_PUBLISHABLE_KEY'); and insert the Form Action method.
Here's the test method in my process class...
************************************************************************
* StripeCharge
****************************************
* Function: Gets the token from the HTML form
* and calls the Stripe API to make
* a credit card charge.
* Assume:
************************************************************************
FUNCTION StripeCharge()
*-----------------------------
LOCAL ARRAY laVars[1,2]
LOCAL lnVars, lcToken, lcURL, loHttp, lcResponse
lnVars = Request.aFormVars(@laVars)
lcToken = laVars[1,2] && revise later for multiple form vars
lcURL = "https://api.stripe.com/v1/charges"DO wwHttp
loHTTP = CREATEOBJECT([WWC_WWHTTP])*
* From what I can gather, the Auth header must be exactly
* like this. The docs don't describe this but the error message
* in the response does.
* It needs to be named "Authorization" and the value needs
* to be the string "Bearer" + <space> + YOUR_SECRET_KEY
*
loHTTP.AddHeader("Authorization","Bearer YOUR_SECRET_KEY")loHTTP.AddPostKey("amount",1000) && $10.00
loHTTP.AddPostKey("currency","usd")
loHTTP.AddPostKey("description","My first charge")
loHTTP.AddPostKey("card",m.lcToken)lcResponse = loHttp.HTTPGet(m.lcURL)
Response.Write(m.lcResponse)ENDFUNC
Initially I tried sending the parameters in the query string and then as a JSON object. Neither is acceptable. The parameters need to be passed as individual post key values.
This code successfully created a charge.
Now it's just a matter of parsing the JSON response.
Carl
Hi Carl.
I had an email dialog with them to pin down the details. Turns out it's a two step process:
- Use the provided javascript code to gather cc info and get a 'card token'. This appears to be in the API as 'Create a Card Token'.
- Use the token in step one to get a 'Charge Code', while being sure to set "capture: true". This is what you are calling 'Create a Charge'.
Alternatively, you can set "capture: false" and then Use the charge code in step two to complete the transaction.
I have not gotten back to implementing what I have learned, but I'll be happy to share the code once I do. Please do the same for me if you do it first. I was using Authorize.net until recently so it's just a matter of retrofitting the stripe API.
Michael
Hi Michael,
Have you made any progress with this?
I just started playing around with stripe in WConnect and have not yet managed to get a charge processed.
I've tried sending the parameters both as a JSON object and in the querystring but I don't have them right yet.
Curious to see how you made out.
Carl
I'm having a little trouble completing transactions using Stripe for my payment processing. Has anyone implemented their API into WebConnect or desktop app already?
They avoid merchant charges, making processing much cheaper for non-card transactions.
That's easy. Use wwJsonSerializer.DeserializeJson()...
+++ Rick ---
Hi Michael,
Here's what I've got so far.
I copied this sample HTML code into an HTM file.
All I had to do with this for testing is to insert my actual publishable key in line 15 - Stripe.setPublishableKey('YOUR_PUBLISHABLE_KEY'); and insert the Form Action method.
Here's the test method in my process class...
************************************************************************
* StripeCharge
****************************************
* Function: Gets the token from the HTML form
* and calls the Stripe API to make
* a credit card charge.
* Assume:
************************************************************************
FUNCTION StripeCharge()
*-----------------------------
LOCAL ARRAY laVars[1,2]
LOCAL lnVars, lcToken, lcURL, loHttp, lcResponse
lnVars = Request.aFormVars(@laVars)
lcToken = laVars[1,2] && revise later for multiple form vars
lcURL = "https://api.stripe.com/v1/charges"DO wwHttp
loHTTP = CREATEOBJECT([WWC_WWHTTP])*
* From what I can gather, the Auth header must be exactly
* like this. The docs don't describe this but the error message
* in the response does.
* It needs to be named "Authorization" and the value needs
* to be the string "Bearer" + <space> + YOUR_SECRET_KEY
*
loHTTP.AddHeader("Authorization","Bearer YOUR_SECRET_KEY")loHTTP.AddPostKey("amount",1000) && $10.00
loHTTP.AddPostKey("currency","usd")
loHTTP.AddPostKey("description","My first charge")
loHTTP.AddPostKey("card",m.lcToken)lcResponse = loHttp.HTTPGet(m.lcURL)
Response.Write(m.lcResponse)ENDFUNC
Initially I tried sending the parameters in the query string and then as a JSON object. Neither is acceptable. The parameters need to be passed as individual post key values.
This code successfully created a charge.
Now it's just a matter of parsing the JSON response.
Carl
Hi Carl.
I had an email dialog with them to pin down the details. Turns out it's a two step process:
- Use the provided javascript code to gather cc info and get a 'card token'. This appears to be in the API as 'Create a Card Token'.
- Use the token in step one to get a 'Charge Code', while being sure to set "capture: true". This is what you are calling 'Create a Charge'.
Alternatively, you can set "capture: false" and then Use the charge code in step two to complete the transaction.
I have not gotten back to implementing what I have learned, but I'll be happy to share the code once I do. Please do the same for me if you do it first. I was using Authorize.net until recently so it's just a matter of retrofitting the stripe API.
Michael
Hi Michael,
Have you made any progress with this?
I just started playing around with stripe in WConnect and have not yet managed to get a charge processed.
I've tried sending the parameters both as a JSON object and in the querystring but I don't have them right yet.
Curious to see how you made out.
Carl
I'm having a little trouble completing transactions using Stripe for my payment processing. Has anyone implemented their API into WebConnect or desktop app already?
They avoid merchant charges, making processing much cheaper for non-card transactions.
West Wind Technologies
Making waves on the Web
from Maui
Hi Michael,
Here's what I've got so far.
I copied this sample HTML code into an HTM file.
All I had to do with this for testing is to insert my actual publishable key in line 15 - Stripe.setPublishableKey('YOUR_PUBLISHABLE_KEY'); and insert the Form Action method.
Here's the test method in my process class...
************************************************************************
* StripeCharge
****************************************
* Function: Gets the token from the HTML form
* and calls the Stripe API to make
* a credit card charge.
* Assume:
************************************************************************
FUNCTION StripeCharge()
*-----------------------------
LOCAL ARRAY laVars[1,2]
LOCAL lnVars, lcToken, lcURL, loHttp, lcResponse
lnVars = Request.aFormVars(@laVars)
lcToken = laVars[1,2] && revise later for multiple form vars
lcURL = "https://api.stripe.com/v1/charges"DO wwHttp
loHTTP = CREATEOBJECT([WWC_WWHTTP])*
* From what I can gather, the Auth header must be exactly
* like this. The docs don't describe this but the error message
* in the response does.
* It needs to be named "Authorization" and the value needs
* to be the string "Bearer" + <space> + YOUR_SECRET_KEY
*
loHTTP.AddHeader("Authorization","Bearer YOUR_SECRET_KEY")loHTTP.AddPostKey("amount",1000) && $10.00
loHTTP.AddPostKey("currency","usd")
loHTTP.AddPostKey("description","My first charge")
loHTTP.AddPostKey("card",m.lcToken)lcResponse = loHttp.HTTPGet(m.lcURL)
Response.Write(m.lcResponse)ENDFUNC
Initially I tried sending the parameters in the query string and then as a JSON object. Neither is acceptable. The parameters need to be passed as individual post key values.
This code successfully created a charge.
Now it's just a matter of parsing the JSON response.
Carl
Hi Carl.
I had an email dialog with them to pin down the details. Turns out it's a two step process:
- Use the provided javascript code to gather cc info and get a 'card token'. This appears to be in the API as 'Create a Card Token'.
- Use the token in step one to get a 'Charge Code', while being sure to set "capture: true". This is what you are calling 'Create a Charge'.
Alternatively, you can set "capture: false" and then Use the charge code in step two to complete the transaction.
I have not gotten back to implementing what I have learned, but I'll be happy to share the code once I do. Please do the same for me if you do it first. I was using Authorize.net until recently so it's just a matter of retrofitting the stripe API.
Michael
Hi Michael,
Have you made any progress with this?
I just started playing around with stripe in WConnect and have not yet managed to get a charge processed.
I've tried sending the parameters both as a JSON object and in the querystring but I don't have them right yet.
Curious to see how you made out.
Carl
I'm having a little trouble completing transactions using Stripe for my payment processing. Has anyone implemented their API into WebConnect or desktop app already?
They avoid merchant charges, making processing much cheaper for non-card transactions.
Michael
www.WebConnectionHosting.com