stripe-payments

How to use Google Apps Script to get POST request from Stripe webhooks

有些话、适合烂在心里 提交于 2020-06-29 05:23:08
问题 I am trying to get POST request from Stripe webhooks into Google sheet, in order process sales data in Google apps environment. I set up a web app by Google Apps Script, and try to test the webhook using testing function of Stripe. I chose "invoice.payment_succeeded" as the event type to test. My code is as follow: function doPost(e) { var jsonString = e.postData.getDataAsString(); var event = JSON.parse(jsonString) var ss = SpreadsheetApp.openById("XXX"); var sheet = ss.getSheetByName("XXX")

Why does my stripe elements form not work on rails?

冷暖自知 提交于 2020-06-28 05:32:06
问题 I'm trying to get Stripe.js to work on my rails app. I am using stripe elements. I have followed the instructions on the stripe docs. The form card input is not showing up where it should. It just shows the submit button. I am trying to place the Stripe form in an existing rails form I have. <!DOCTYPE html> <html> <head> <title>Bennett</title> <%= csrf_meta_tags %> <%= csp_meta_tag %> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

Stripe Connect PaymentIntent error: No such payment_intent

三世轮回 提交于 2020-06-27 11:30:18
问题 I'm using stripe connect in my API, and I would like to update and process an existing paymentIntent. The paymentIntent creation is successful using the NodeJS stripe package const paymentIntent = await stripe.paymentIntents.create( { payment_method_types: ["card"], amount: 1499, // in cents currency: "usd" }, { stripe_account: "acct_xxx" } ) This successfully returns a paymentIntent object with id ('pi_yyy'), client_secret ('pi_yyy_secret_zzz'), status ('requires_payment_method') and more

Stripe API: get upcoming invoice for cancelled Subscription

北城余情 提交于 2020-06-26 14:07:30
问题 I used this code to cancel stripe subscription with prorate $user = User::find(Auth::id()); $subscription = \Stripe\Subscription::retrieve( $user->subscription('main')->stripe_id ); $subscription->delete([ 'prorate' => true ]); in the stripe dashboard subscription cancelled and it is created upcoming invoice with prorate amount. I want to refund prorate amount to customer's card. I tried to get prorate amount using below code. $subscription = \Stripe\Subscription::retrieve($user->subscription

Stripe API: get upcoming invoice for cancelled Subscription

无人久伴 提交于 2020-06-26 14:06:07
问题 I used this code to cancel stripe subscription with prorate $user = User::find(Auth::id()); $subscription = \Stripe\Subscription::retrieve( $user->subscription('main')->stripe_id ); $subscription->delete([ 'prorate' => true ]); in the stripe dashboard subscription cancelled and it is created upcoming invoice with prorate amount. I want to refund prorate amount to customer's card. I tried to get prorate amount using below code. $subscription = \Stripe\Subscription::retrieve($user->subscription

Stripe: HTML Checkout iOS Cordova wont open

こ雲淡風輕ζ 提交于 2020-06-25 07:57:33
问题 I've built an app which uses stripes checkout html form element. It appears to work well on Android(cordova) and browser. On ios cordova the popups dim effect happens for 5secs and then it goes back to normal (no popup opened) and on safari the checkout form opens on a different tab instead of being a popup. Also the form is custom but even the basic form doesn't work. Please help! 回答1: I have been having the same issue on ios. Needed to add two lines to the config.xml <access origin="*" />

Stripe- Send Payment to Customers

喜欢而已 提交于 2020-06-24 06:55:50
问题 I want to use STRIPE PHP API for creating payments to customers and for that i have found the code to create the customers but not for to create payment for them. Code to create customers: https://stripe.com/docs/api#create_customer require_once('./lib/Stripe.php'); Stripe::setApiKey("sk_test_k9NE13Q2LjsIvYTNQHiP5C5H"); Stripe_Customer::create( array( "description" => "Customer for test@example.com", "card" => "tok_1509ycG2gfbJDdl3oYWMe6yq" // obtained with Stripe.js )); My Scenario is : I

Stripe- Send Payment to Customers

孤者浪人 提交于 2020-06-24 06:52:28
问题 I want to use STRIPE PHP API for creating payments to customers and for that i have found the code to create the customers but not for to create payment for them. Code to create customers: https://stripe.com/docs/api#create_customer require_once('./lib/Stripe.php'); Stripe::setApiKey("sk_test_k9NE13Q2LjsIvYTNQHiP5C5H"); Stripe_Customer::create( array( "description" => "Customer for test@example.com", "card" => "tok_1509ycG2gfbJDdl3oYWMe6yq" // obtained with Stripe.js )); My Scenario is : I

Stripe Connect Firebase Functions

非 Y 不嫁゛ 提交于 2020-06-22 12:51:12
问题 Looked all over, tried capturing the code via swift but still need a function to fire off the code to get an Express account to connect. Won't waste your time with the code attempts, so looking for Firebase Functions that will setup a Stripe Connect endpoint for redirection and send back the code to finalise the process. Anyone care to help? Thanks for reading. 回答1: You'll want to do something like this: Open a browser or web view from your App. Let the user work through the form to sign up

Stripe - cannot create a plan

折月煮酒 提交于 2020-06-22 04:26:44
问题 I am using Laravel Cashier to implement a recurring payment system. I need a plan to make subscription. Stripe doc says : "You can create plans using the API, or in the Stripe Dashboard." But when I go to dashboard by clicking on the link there , I do not see any way to create any plan. Question : So how do I create a plan there so that I can use it in the server side Laravel Cashier Stripe implementation in the following way ? $user->newSubscription('main', $plan)->create($token, ['email' =>