This file contains hidden or 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
| # I am using Stripe Connect and stroing Customers to my account | |
| # Get Customer from Stripe | |
| stripe_customer = Stripe::Customer.retrieve(stripe_customer_id) | |
| # From AliPay Checkout I got stripeToken e.g. atok_asjdasalkj | |
| strip_alipay = stripe_customer.sources.create({ source: params[:stripeToken] }) | |
| # I saved strip_alipay.id for future use | |
| stripe_token = Stripe::Token.create( | |
| { |
This file contains hidden or 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
| # I am using Stripe Connect and stroing Customers to my account | |
| # Get Customer from Stripe | |
| stripe_customer = Stripe::Customer.retrieve(stripe_customer_id) | |
| # From AliPay Checkout I got stripeToken e.g. atok_asjdasalkj | |
| strip_alipay = stripe_customer.sources.create({ source: params[:stripeToken] }) | |
| # I saved strip_alipay.id for future use | |
| stripe_charge = Stripe::Charge.create( |
This file contains hidden or 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
| stripe_bitcoin_receiver = Stripe::BitcoinReceiver.create( | |
| { | |
| amount: dollar_to_cents(amount), | |
| currency: currency, | |
| description: charge_description, | |
| refund_mispayments: true, | |
| email: user.email, | |
| metadata: charge_metadata | |
| }, | |
| merchant_stripe_access_token |
This file contains hidden or 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
| stripe_customer = Stripe::Customer.create( | |
| description: "ShareNGo Customer", | |
| email: email, | |
| metadata: { "First Name" => user.first_name, | |
| "Last Name" => user.last_name, | |
| "Email" => user.email } | |
| ) | |
| strip_card = stripe_customer.sources.create( | |
| { |
This file contains hidden or 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
| When I am trying to authorized charge then I am getting sucess response with | |
| stripe_charge = Stripe::Charge.create( | |
| { | |
| amount: 1000, | |
| currency: "usd", | |
| source: stripe_token.id, | |
| description: "Charge for Invoice", | |
| application_fee: 100, | |
| capture: false |