stripe-payments

Rails “table-less” Model

孤人 提交于 2019-12-12 10:17:03
问题 I'm focused on moving my logic into my models. I've already integrated Stripe Payments into my Rails 4 app and the interaction with Stripe's API is taken care of in one of my standard (table-backed) models. However, I'm just beginning to think about whether I should introduce a table-less model for this scenario (perhaps stripe.rb ) to take care of the API calls, create new Stripe customers, updates cards etc. Anyone got any advice on this and if you recommend a new model could you highlight

Poltergeist Stripe checkout.js

不问归期 提交于 2019-12-12 07:59:45
问题 I'm trying to test in my Rails app the Stripe checkout popup (http://www.stripe.com/checkout). I was using Capybara + selenium-driver and everything worked well. When the page is loaded, the checkout.js adds an iframe, and I was able to access it within_frame('stripe_checkout_app') do do something end Now, switching to Poltergeist, I get this error: Failure/Error: within_frame('stripe_checkout_app') do Capybara::Poltergeist::FrameNotFound: The frame 'stripe_checkout_app' was not found. and if

Ajax error function is executing with error message “Gateway time-out” when multiple users go through registration process

…衆ロ難τιáo~ 提交于 2019-12-12 06:51:40
问题 I have built an app with a registration process for a magazine company. The app is especially for their subscribers who are paying a monthly subscription through stripe. The registration process works as follows: User enters name, email, password (twice) within the application Ajax is performed with POST and the user details are sent to php page called registration_processing.php on a remote server. I firstly check if the email address exists already in the app database If the email doesn't

Subscription form with Stripe not passing parameters properly

北慕城南 提交于 2019-12-12 06:09:15
问题 I am getting the following error on my Rails 4.2 application. I'm trying to setup subscriptions with Stripe. A subscription belongs to a business and has_one plan. On my view I pass the params in the URL: http://localhost:3000/subscriptions/new?plan_id=2&business_id=1001 After I submit the form I get the error below and my code follows. Forgive me if this is a beginner question. Subscriptions Controller class SubscriptionsController < ApplicationController before_action :set_subscription,

Stripe and tax_percent in my Rails app

空扰寡人 提交于 2019-12-12 05:39:11
问题 So I've got my rails app selling subscriptions to access content. I'm temporarily inserting a hidden field in the check-out form to pass tax_percent to Stripe's API, but it keeps showing up in the Stripe dashboard as null. The tax is only for NJ and is a straight 7% if the buyer is also in NJ. I'm calculating the sales tax via a javascript call (Calculating Sales Tax for a US State in Javascript), which then pushes the value to the subscription#create action. Except it ain't working. Here's

Updating MetaData on Connected account fails

元气小坏坏 提交于 2019-12-12 05:19:59
问题 I am using stripe connect( destination payment ) with the help of stripe.net library from Jaymedavis. The problem that I am facing is that I am not able to retrieve the destination payment ID to update the metadata in the connected account. The following line returns a null preventing me from updating meta data on the connected account. But the strange thing is that when I log in to the dashboard the destination payment ID exists. I am not sure why I am not able to retreive it in code. Is the

Using Cloud Functions for Firebase as my backend for implementing Stripe in iOS?

戏子无情 提交于 2019-12-12 04:38:40
问题 I currently have an iOS app that implements Firebase to authenticate users and store data references in its realtime database. I want to add a feature to the app where the logged in users can purchase a good and I want to use Stripe to process the payment. I know in order for Stripe to work, a backend server must be uses to help the transaction go through since Stripe only delivers a token and doesn't actually process the payment themselves. I was curious as it's possible to just use Cloud

Multiple Stripe payment forms on single page

╄→尐↘猪︶ㄣ 提交于 2019-12-12 04:30:16
问题 I am trying to get token from stripe account. its working fine if there is only one form but not on multiple. I want to get the token for the form which is submited by user for that purpose i am sending ajax request to stripe by giving seperate id to every form. but its showing Type error b is not defined. I want to know weather there is syntax error or not. if not than why its not working. <form id="stripe_form-1" role="form" method="post" action="#"> <div id="#payment-errors-1"></div>

How to charge a stripe card in meteor

白昼怎懂夜的黑 提交于 2019-12-12 04:00:16
问题 Having a warm time trying to charge a card in Meteor. The error I get is: Exception while invoking method 'chargeCard' Error: Match error: Expected string, got object . I do get the modal where I typed in the email and card number but after pressing the pay button, in terminal I get the error message. How to call the charge function properly? I cant find any tutorial that matches closely the way I implement it. The setup is very basic. I also have jquery installed. Template: <template name=

Rails: Return JSON of Stripe Response from Server

浪尽此生 提交于 2019-12-12 03:56:06
问题 I have multiple clients relying on my server that processes Stripe charge requests. When a charge is processed, I want to send my client back JSON of whether the charge was successfully created, and if it wasn't, the reasons why. My server can be viewed here. The code for my controller is the following: class ChargesController < ApplicationController protect_from_forgery skip_before_action :verify_authenticity_token def new end def create # Amount in cents @amount = 500 customer = Stripe: