stripe-payments

Error when creating charge with Parse.com Stripe API

随声附和 提交于 2019-12-13 19:23:20
问题 I'm trying to create a charge with a test account on stripe. Here is my parse cloud function: Parse.Cloud.define("charge", function(request, response) { var Stripe = require('stripe'); Stripe.initialize('...'); Stripe.Charges.create({ amount: 1000, currency: "usd", customer: "..." },{ success: function(httpResponse) { response.success("Purchase made!"); }, error: function(httpResponse) { response.error("Uh oh, something went wrong"); } }); }); I've hard coded the customerID into the function

Wrapping Stripe create customer callbacks in Fibers in Meteor

独自空忆成欢 提交于 2019-12-13 18:57:45
问题 I'm having trouble getting Stripe.js to work when creating a new customer. Here is their Node.js code in their tutorial: // Set your secret key: remember to change this to your live secret key in production // See your keys here https://dashboard.stripe.com/account/apikeys var stripe = require("stripe")("sk_test_9999999999999999999999"); // (Assuming you're using express - expressjs.com) // Get the credit card details submitted by the form var stripeToken = request.body.stripeToken; stripe

Stripe throws invalid integer error

时间秒杀一切 提交于 2019-12-13 15:01:42
问题 I am unable to charge the amount $49.99 in stripe. I am going through the following links but nothing workout Stripe Checkout Price error - Invalid Integer Stripe Rails: Invalid integer: 1.06 I would like to charge the amount as it is. I don't want to round off the payment stripe.charges.create({ // Charge the customer in stripe // amount: req.query.amount, amount: 49.99, currency: 'usd', customer: req.customer }).then(function(charge) { // Use and save the charge info in our db var

TypeError: Object [object Object] has no method ' '

て烟熏妆下的殇ゞ 提交于 2019-12-13 10:42:23
问题 I am getting the following error when I try to create a customer. I tried downgrading Parse. Currently it is running the latest(2.2.8) version but I tried version 1.4.2 too, and I am still getting the following error. What can be the reason for this "TypeError"? TypeError: Object [object Object] has no method 'isString' at request (stripe.js 49:25) at post (stripe.js:117:12) at Object.module.exports.Customers.create (stripe.js:239:16) at main.js:15:22 Main.js: //STRIPE var Stripe = require(

Stripe is charging only 1% of the amount - test mode

感情迁移 提交于 2019-12-13 09:37:51
问题 I am implementing Stripe connect to charge a customer and then transfer commission to another associated account but I am stuck at the first step. I have successfully taken card details of the customer and using stripe.js, I have tokenized it and then exchanged that token for a customer id which I saved in my DB. Now for charging I am using: $charge = \Stripe\Charge::create([ "amount" => 774, "currency" => "usd", "customer" => $customerId, "transfer_group" => $uniqueTransferString ]); Now

Get (localized) payment source registration errors directly from Stripe Elements

假装没事ソ 提交于 2019-12-13 08:12:28
问题 I'm trying to localize error messages occurring during the registration of payment sources and am looking for an easy way out: Is it possible to let stripe do the complete validation of a card directly via the stripe.js api and get a localized error message as a result before I send the token to my server (and then to stripe)? Some errors are caught by the card element, e.g. an incorrect checksum (CC No. 4242424242424241 ) and returned localized by the js library, giving me hope that I have

PassportJS and Stripe

时间秒杀一切 提交于 2019-12-13 07:34:28
问题 I am attempting to charge a user when they create an account. Everything is set up and working perfect with the code before. When a user sign's up for a "premium" section of the website they have an account created and are charged with the code below. The problem: If a user's credit card ends up getting declined for various reasons... their user account is STILL created. How would I change my code below to not reach that part of the code if the credit card fails? Note: this DOES work for when

How to use Rails .build to create a user with a stripe subscription

纵然是瞬间 提交于 2019-12-13 06:29:19
问题 I'm using Rails + Devise along with Stripe for billing. I'm working to create a controller method that creates a user with a subscription at the same time but am running into errors. My controller method: def signup_w_cc @user = User.new(:email => params[:user][:email] @user.subscriptions.build(:stripe_card_token => params[:stripe_card_token], :plan_id => 1, :quantity => 1) @user.save end This is failing, when I do @user.save, the subscription model is not getting the required user_id field.

Best approach for exchanging auth code to tokens

天大地大妈咪最大 提交于 2019-12-13 06:27:02
问题 I would like to know the best approach to associate a user as express account to my stripe platform. I have confusion between following two approaches: Approach 1 I show a "connect to stripe" button on the front end of the site which has a redirect_uri parameter to the same page. User clicks on it, goes to stripe interface, fills up necessary details and gets back to the same page of my site with authorize code. Then I send an ajax request to my Server providing that authorize code which I

Paypal api - need a payments pro account?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 05:09:02
问题 Is is possible to send payment via the api without signing up for the Payments Pro account? The £20 per month charge seems a bit expensive just to send a payment when stripe do it without a monthly charge. What are the options when sending cash to a paypal account via a form on my website? I am tied to Paypal as it is the preference of the client. There are only going to be a few payments per month, for not a lot of cash but it needs to be seamless. 回答1: The only API that requires Payments