Getting Stripe Token from form

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting Stripe Token from form

David Merrick
When I submit the form to Stripe

I am generating the stripe token.in 

POST /v1/tokens


Response body
{
"object": "token",
"card": {
"id": "card_1D2tSkISUkCPHLGnENkY88xy",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "Visa",
"country": "US",
"cvc_check": "unchecked",
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2018,
"funding": "credit",
"last4": "4242",
"metadata": {
},
"name": null,
"tokenization_method": null
},
"client_ip": "125.239.133.236",
"created": 1535171606,
"livemode": false,
"type": "card",
"used": false
}

but its not showing up in

POST /v1/customers


Request POST body
{
"email": "[hidden email]"
}

The source variable with the stripe token should show below the email variable.

Any help would be appreciated as I gave some one E.B Adair California   Rails job which I could have kept.

Cheers Dave

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

users_controller.rb (1K) Download Attachment
user.rb (3K) Download Attachment
new.html.erb (247 bytes) Download Attachment
users.js.coffee (843 bytes) Download Attachment
stripe.rb (109 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting Stripe Token from form

David Merrick
See amended javascript still no change

On Saturday, August 25, 2018 at 4:58:36 PM UTC+12, David Merrick wrote:
When I submit the form to Stripe

I am generating the stripe <a href="http://token.in" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftoken.in\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEG2onZVUU8uDj8SVdmZH1kQnpThg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftoken.in\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEG2onZVUU8uDj8SVdmZH1kQnpThg&#39;;return true;">token.in 

POST /v1/tokens


Response body
{
"id": <a href="https://dashboard.stripe.com/test/logs?object=tok_1D2tSkISUkCPHLGnqBhLrWr5" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdashboard.stripe.com%2Ftest%2Flogs%3Fobject%3Dtok_1D2tSkISUkCPHLGnqBhLrWr5\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNElAY3TAQJxm6ybLXtw7GK8ZfHz6A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdashboard.stripe.com%2Ftest%2Flogs%3Fobject%3Dtok_1D2tSkISUkCPHLGnqBhLrWr5\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNElAY3TAQJxm6ybLXtw7GK8ZfHz6A&#39;;return true;">"tok_1D2tSkISUkCPHLGnqBhLrWr5",
"object": "token",
"card": {
"id": "card_1D2tSkISUkCPHLGnENkY88xy",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "Visa",
"country": "US",
"cvc_check": "unchecked",
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2018,
"funding": "credit",
"last4": "4242",
"metadata": {
},
"name": null,
"tokenization_method": null
},
"client_ip": "125.239.133.236",
"created": 1535171606,
"livemode": false,
"type": "card",
"used": false
}

but its not showing up in

POST /v1/customers


Request POST body
{
"email": "[hidden email]"
}

The source variable with the stripe token should show below the email variable.

Any help would be appreciated as I gave some one E.B Adair California   Rails job which I could have kept.

Cheers Dave

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

users.js.coffee (843 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Getting Stripe Token from form

Michael Breen-2
Hello David.

This list is reserved for discussing the development of Ruby on Rails itself. Your best bet to getting help on working with Rails would be Stack Overflow, https://stackoverflow.com/questions/tagged/ruby-on-rails

Good luck!

On Sat, Aug 25, 2018 at 1:13 AM David Merrick <[hidden email]> wrote:
See amended javascript still no change

On Saturday, August 25, 2018 at 4:58:36 PM UTC+12, David Merrick wrote:
When I submit the form to Stripe

I am generating the stripe token.in 

POST /v1/tokens


Response body
{
"object": "token",
"card": {
"id": "card_1D2tSkISUkCPHLGnENkY88xy",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "Visa",
"country": "US",
"cvc_check": "unchecked",
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2018,
"funding": "credit",
"last4": "4242",
"metadata": {
},
"name": null,
"tokenization_method": null
},
"client_ip": "125.239.133.236",
"created": 1535171606,
"livemode": false,
"type": "card",
"used": false
}

but its not showing up in

POST /v1/customers


Request POST body
{
"email": "[hidden email]"
}

The source variable with the stripe token should show below the email variable.

Any help would be appreciated as I gave some one E.B Adair California   Rails job which I could have kept.

Cheers Dave

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.