stripe-payments

async await + toPromise hangs

*爱你&永不变心* 提交于 2019-12-30 06:52:18
问题 I'm using ngx-stripe , and the createToken returns an Observable which I've tried to convert to a promise so that I can use Async/await. However, it looks as though the promise dosen't resolve. Debugging doesn't reveal anything, and my try/Catch blocks doesn't capture any errors. I wanted to know whether I'm using the toPromise correctly : import { Elements, Element as StripeElement, ElementsOptions, BankAccountData, StripeService } from 'ngx-stripe'; constructor( public stripeService:

Rails: Stripe form being posted twice

江枫思渺然 提交于 2019-12-29 10:08:49
问题 I have an Enrollment model with a stripe form on Enrollment#new. When a user submits the form, it appears to be submitting twice to Enrollment#create. Here's the new.html.erb with the stripe form: <%= form_tag enrollments_path, :id=>"stripeForm" do %> <%= text_field_tag(:number, nil, :placeholder=>"Credit Card Number", :class=>"form-control", :maxlength => 19, :'data-stripe'=>"number") %> <%= text_field_tag(:'exp-month', nil, :placeholder=>"mm", :class=>"form-control", :maxlength => 2, :'data

Parse + Stripe iOS main.js

我的梦境 提交于 2019-12-28 04:21:05
问题 I'm really struggling getting Parse + Stripe to work in my project. At this point, I want the simplest working version that allows me to charge the user. The closest thing I've found to an answer is the following: Simplest Example I've Found When I use the corrected code from the link above, with my secret I get the following Error: Input: {"token":"tok_16kNOcIPNR1PIJsTyhvwTFJ9"} Result: TypeError: Object [object Object] has no method 'isString' at request (stripe.js:49:25) at post (stripe.js

The data could not be read because it isn't in the correct format JSON & SWIFT 3

喜欢而已 提交于 2019-12-25 09:17:05
问题 Here is Stripe's example code for retrieving a customer (https://github.com/stripe/stripe-ios/blob/master/Example/Stripe%20iOS%20Example%20(Simple)/MyAPIClient.swift): @objc func retrieveCustomer(_ completion: @escaping STPCustomerCompletionBlock) { guard let key = Stripe.defaultPublishableKey() , !key.contains("#") else { let error = NSError(domain: StripeDomain, code: 50, userInfo: [ NSLocalizedDescriptionKey: "Please set stripePublishableKey to your account's test publishable key in

rails 4 stripe payment causing line item invalid error

只愿长相守 提交于 2019-12-25 03:44:34
问题 Like others working with Stripe payments, I was getting an error 'Cannot charge a customer that has no active card'. The form was not appending the token because the javascript did not have a matching id in the form, but now I am getting an rails error and the card is not being charged, the customer is created, the error states that there is an invalid line item, when the code to create the customer and charge the card is not run the order is created without error. Order View <script type=

Stripe Webhooks Not Working

喜欢而已 提交于 2019-12-25 02:43:12
问题 I have implemented a stripe test gateway in an application... The integration page is using the jQuery mode for sending data. Its built in the MVC structure using Codeigniter. Now, here my controller: <?php class stripe_connect extends CI_Controller{ public function __construct() { parent::__construct(); @session_start(); } function index() { $this->load->view('stripe_same_site_connect'); } } ?> And here's my view file, <!DOCTYPE html> <html> <head> <script type="text/javascript" src="<?php

Stripe: ActionController::UrlGenerationError | No route matches | missing required keys: [:id]

蹲街弑〆低调 提交于 2019-12-25 02:12:32
问题 I am just learning RoR and need I am having trouble with Stripe integration. I have done everything as it says here except I have changed "charges" to "charge." The error I am receiving is: No route matches {:action=>"show", :controller=>"charge"} missing required keys: [:id] . It's not letting me do: <%= form_tag charge_path do %> This is my controller: class ChargeController < ApplicationController def new end def create # Amount in cents @amount = 0 customer = Stripe::Customer.create(

Invalid API Key provided error using dotenv env for stripe

僤鯓⒐⒋嵵緔 提交于 2019-12-25 01:53:20
问题 I have my env file with the correct test codes. I then added the following to my stripe.rb : Rails.configuration.stripe = { :publishable_key => ENV['STRIPE_PUBLISHABLE_KEY'], :secret_key => ENV['STRIPE_SECRET_KEY'] } Stripe.api_key = Rails.configuration.stripe[:secret_key] In my env file: export STRIPE_PUBLISHABLE_KEY=pk_test_x export STRIPE_SECRET_KEY=sk_test_x I tried with and without export and with and without quotations. Then in the beginning of my stripe.js file var stripe = Stripe("<%=

Can you Convert Stripe Java Code into CFscript

眉间皱痕 提交于 2019-12-25 01:44:17
问题 The code below is how to impletment stripe payment API, I was wondering if I just convert it to CFscript and call my normal variable will it work? // 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 Stripe.apiKey = "sk_test_aHhoYVOnsayNSIleB1ETUCSq00vUOS9YVQ"; Map<String, Object> params = new HashMap<String, Object>(); ArrayList<String> paymentMethodTypes = new ArrayList<>();

Can i pass different currency in active-merchant with stripe in Rails 4 application?

和自甴很熟 提交于 2019-12-25 01:24:23
问题 I am developing Rails 4 application where user can subscribe one time pay with application. For subscription, use Active Merchant with stripe where now user pay $50 right now and payment done successfully. Below code : ActiveMerchant::Billing::Base.mode = :test transaction = ActiveMerchant::Billing::StripeGateway.new(:login => Rails.application.secrets.stripe_secret_key) paymentInfo = ActiveMerchant::Billing::CreditCard.new( :number => purchage_params[:card_holder_number], :month => purchage