stripe-payments

Two Separate Stripe Checkout Forms on One Page

白昼怎懂夜的黑 提交于 2019-12-12 03:53:53
问题 How can I have two Stripe checkouts on the same page? Currently, I have two buttons, a charge.php , and a charge-monthly.php file. Hoping to Achieve: two separate buttons: one for one-time donation / the other for monthly donation. FORM ENTRY - single donation <form action="index.php" method="post"> <input class="form-control donation-page" id="custom-donation-amount" min="1" step="10.00" type="number" value="100"> <script src="https://checkout.stripe.com/checkout.js"></script> <button class=

Integrating Stripe in Rails app

佐手、 提交于 2019-12-12 03:39:21
问题 I am trying to create a custom form with stripe, and while it all appears to be submitting, when I check my dashboard in Stripe, although I do see a record of the transaction - I do not see the amount or any reference to the cc coming through. With that said, I am not quite sure what I SHOULD be seeing in the dashboard. But I am pretty sure I am doing something wrong. Here is the code to my form: <div class="container"> <div class="row Row one"> <div class="col-sm-12 col-md-10"> <%= form_for

How to create variable subscriptions in Stripe

拜拜、爱过 提交于 2019-12-12 03:34:54
问题 I am using stripe to capture credit cards. I have my forms so that they are variable inputs, and it works great. I am passing the information from my <input> to a charge.php file and it captures successfully. When I try to use this information to create subscriptions, I am unable to use variable amounts. I can only create a subscription that has a set amount. I was hoping to use the $finalamount to set the amount of the subscription. I am okay with the name and id to be the same as the amount

Stripe::InvalidRequestError (This customer has no attached payment source)

只谈情不闲聊 提交于 2019-12-12 03:27:12
问题 There seems to be a problem with sending customer data and token back to Stripe's server. I'm currently using the test api to make dummy transactions. But, I cannot get past this point for no reason at all. I've tried everything to fix this error. I will post the code and error message below. Subscriptions_Controller.rb class SubscriptionsController < ApplicationController before_filter :authenticate_user!, except: [:new] before_action :redirect_to_signup, only: [:new] def show end def new

Woocommerce get new order id on subscription renewal

陌路散爱 提交于 2019-12-12 02:49:52
问题 I have Woocommerce subscriptions with the Stripe Gateway setup and working. Each time I manually test a scheduled renewal it saves a new order id for the renewal however I can't find a way to access this. I have the scheduled_subscription_payment() set to print our the $order object but the order_id is always the same due to the subscription referencing the initial order. Is there a way to get the new order id for a subscription renewal right after it is triggered? The function I'm

What should I use as a starting point each month for counting how much of my resources the user consumes?

爷,独闯天下 提交于 2019-12-12 02:02:42
问题 Say, I use stripe subscriptions for my users with one plan which is $10 per month for 100 API requests and that's the standard price. However, if the user has used 150 API requests, I charge them $3 more on top on $10. For 200 and more requests it's total of $17. Say, I've subscribed the user on October 9th. On November 9th they will be charged again by Stripe. When should I "freeze" the amount of the APIs the user has used during the month to calculate the overall price and start counting

Rails / Stripe - taking multiple payments

☆樱花仙子☆ 提交于 2019-12-12 00:53:23
问题 I'm building an events app using Rails and Stripe to handle payments. I've used javascript for my booking page in order to allow a user to book and pay for multiple spaces rather than just one at a time. The booking page allows for this as you can see here - However on my Stripe dashboard only one payment has been taken for one space - How do I solve this so it takes the full payment indicated on the booking view? Here's my Controller and view code - bookings_controller.rb class

Creating Stripe Customer - cannot resolve symbol apiKey

ぃ、小莉子 提交于 2019-12-11 19:38:19
问题 In Android Studio, even though I'm copying and pasting the code directly from the stripe docs, I'm getting the "cannot resolve symbol apiKey" error from this line: Stripe.apiKey = "sk_test_notmyrealapikey"; I've already added the stripe line to my gradle: compile 'com.stripe:stripe-android:+' I'm successfully exchanging the card information for a token, but now I'm trying to use that token to create a customer. When I remove the Stripe.apiKey line, stripe's error message tells me to add it. I

How to solve fatal error when not receiving data and it sends data when loading the page again stripe?

﹥>﹥吖頭↗ 提交于 2019-12-11 17:22:48
问题 When I send the data of the card to make the purchase by means of stripe it shows me the following message: Successfully charged $50! tok_1BKYfLDi3J7CIS2eVqZVeZqT But when you do not receive data when sending the payment data shows these errors Notice: Undefined index: token in C:\xampp\htdocs\DesignFormStripe\charge.php on line 9 Fatal error: Uncaught Stripe\Error\Card: Cannot charge a customer that has no active card in C:\xampp\htdocs\DesignFormStripe\php\lib\stripe\lib\ApiRequestor.php

Show a JS script component in Ember/handlebars app [duplicate]

牧云@^-^@ 提交于 2019-12-11 17:14:28
问题 This question already has an answer here : inline javascript within handlebars template (1 answer) Closed 5 years ago . I need to embed a Javscript component (e.g. a Stripe pay button https://stripe.com/docs/checkout ) in my ember app, but apparently I can’t simply put a script tag inside the handlebar script tag.. any suggestion on how this can be done please? 回答1: Create a view and add the script in the didInsertElement hook. Here is a working demo. App.StripeView = Em.View.extend({