stripe-payments

Stripe Payment - Network request failed

旧街凉风 提交于 2020-08-10 19:17:36
问题 I am using stripe for the payment in react native app. For the backend, I have NodeJS running and it is working fine means when I pass the token, the payment gets successfully debited. However, in react native side, I am getting customer card details and creating token and then passing this token to my NodeJS server for payment but every time it gets network error. React native Code pay() { stripe.createToken({ card: { "number": '4242424242424242', "exp_month": 12, "exp_year": 2020, "cvc":

Security concerns with using Stripe checkout over Cordova

十年热恋 提交于 2020-08-01 06:00:51
问题 I'm looking into using Stripe.js for payment processing in a mobile web application wrapped in Cordova. According to the Stripe documentation all checkout pages should be served over https. Since Cordova will technically be serving these pages locally in a webview, are there any security concerns I should worry about? Note: I will still be using https to submit the tokenized card details from Stripe to my remote API server to actually complete the charge. 回答1: I'm an engineer at Stripe.

“No such customer” when charging with Stripe

别等时光非礼了梦想. 提交于 2020-07-23 21:02:44
问题 I was testing around with Stripe API and I couldn't get this basic 'marketplace' scenario to work. The scenario is a buyer buys from a seller, and the application has a fee. My setup: # Seller has already connected their account to the application # through "Stripe Connect Standalone". Below will attempt to charge a customer. import stripe # application's sk from stripe stripe.api_key = "sk...." # Build customer customer = stripe.Customer.create( email = customer.email, card = token_from

Converting Stripe API syntax to Google Apps Script

醉酒当歌 提交于 2020-07-22 05:50:32
问题 This SO answer correctly explains that since the require Node/JS library is not supported by Google Apps Script, the following code changes must be made to get Stripe to work properly in a GAS project: from const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc'); (async () => { const product = await stripe.products.create({ name: 'My SaaS Platform', type: 'service', }); })(); to function myFunction() { var url = "https://api.stripe.com/v1/products"; var params = { method: "post",

stripe does not save if transaction is successful in flask

丶灬走出姿态 提交于 2020-07-10 07:01:37
问题 I am trying to save some information in database if transaction is successful, in the stripe_webhook view. But not successful. is it that data cannot be saved directly in webhook ? so frustrating for me. I checked online for sample codes but could not find the ones that insert or update database for successful transaction. from site.models import Post, Chapter, Order import stripe from sqlalchemy import desc @posts.route("/paynow") @login_required def paynow(): return render_template('paynow

Mock stripe with Jest

蹲街弑〆低调 提交于 2020-07-08 21:44:31
问题 I'd like to mock the node Stripe SDK in Jest because I don't want to run the mock API server from Stripe but I can't figure how how to do it. I'm creating a __mocks__ directory and adding stripe.js but I can't get anything usable to export. I typically get TypeError: Cannot read property 'create' of undefined when calling strypegw.charges.create() . I'm using ES6 module syntax so I import stripe from 'stripe' . 回答1: // your-code.js const stripe = require('stripe')('key'); const customer =

Mock stripe with Jest

时光怂恿深爱的人放手 提交于 2020-07-08 21:41:48
问题 I'd like to mock the node Stripe SDK in Jest because I don't want to run the mock API server from Stripe but I can't figure how how to do it. I'm creating a __mocks__ directory and adding stripe.js but I can't get anything usable to export. I typically get TypeError: Cannot read property 'create' of undefined when calling strypegw.charges.create() . I'm using ES6 module syntax so I import stripe from 'stripe' . 回答1: // your-code.js const stripe = require('stripe')('key'); const customer =

New Stripe SCA checkout flow in Rails

孤街醉人 提交于 2020-07-05 05:12:17
问题 I'm struggling with switching my Rails app to the new Stripe checkout flow to accommodate the new SCA regulation. I want to implement the simple dynamic product routine found in this link: https://stripe.com/docs/payments/checkout/migration#api-products-after I can't figure out where to put the different pieces of code. What should go in: - controller -> in which methods - views -> the event show view for example. The form/button the user will click - javascript -> how to pass the right

New Stripe SCA checkout flow in Rails

余生颓废 提交于 2020-07-05 05:12:10
问题 I'm struggling with switching my Rails app to the new Stripe checkout flow to accommodate the new SCA regulation. I want to implement the simple dynamic product routine found in this link: https://stripe.com/docs/payments/checkout/migration#api-products-after I can't figure out where to put the different pieces of code. What should go in: - controller -> in which methods - views -> the event show view for example. The form/button the user will click - javascript -> how to pass the right