stripe-payments

Detect if subscription is cancelled automatically

a 夏天 提交于 2020-01-02 08:02:38
问题 I have setup my Stripe subscriptions to be automatically cancelled after 3 failed payment attempts and I have customer.subscription.deleted webhook to record the cancelled subscription. Is there a way to detect in customer.subscription.deleted webhook if subscription is cancelled by stripe because of failed payment attempts OR manually cancelled through Stripe Dashboard OR cancelled because of an API request made from our application? 回答1: You can't differentiate between the last two cases,

Detect if subscription is cancelled automatically

风流意气都作罢 提交于 2020-01-02 08:01:09
问题 I have setup my Stripe subscriptions to be automatically cancelled after 3 failed payment attempts and I have customer.subscription.deleted webhook to record the cancelled subscription. Is there a way to detect in customer.subscription.deleted webhook if subscription is cancelled by stripe because of failed payment attempts OR manually cancelled through Stripe Dashboard OR cancelled because of an API request made from our application? 回答1: You can't differentiate between the last two cases,

Code=50 “No such payment_intent” when confirm payment intent for stripe

℡╲_俬逩灬. 提交于 2020-01-02 06:12:24
问题 I am getting following error while confirming payment intent using this method STPAPIClient.shared().confirmPaymentIntent() Error Domain=com.stripe.lib Code=50 "No such payment_intent: pi_1ElaQpFSNNCQ7y59" UserInfo={com.stripe.lib:ErrorMessageKey=No such payment_intent: pi_1ElaQpFSNNCQ7y59, com.stripe.lib:StripeErrorCodeKey=resource_missing, com.stripe.lib:StripeErrorTypeKey=invalid_request_error, com.stripe.lib:ErrorParameterKey=intent, NSLocalizedDescription=No such payment_intent: pi

Code=50 “No such payment_intent” when confirm payment intent for stripe

喜你入骨 提交于 2020-01-02 06:12:12
问题 I am getting following error while confirming payment intent using this method STPAPIClient.shared().confirmPaymentIntent() Error Domain=com.stripe.lib Code=50 "No such payment_intent: pi_1ElaQpFSNNCQ7y59" UserInfo={com.stripe.lib:ErrorMessageKey=No such payment_intent: pi_1ElaQpFSNNCQ7y59, com.stripe.lib:StripeErrorCodeKey=resource_missing, com.stripe.lib:StripeErrorTypeKey=invalid_request_error, com.stripe.lib:ErrorParameterKey=intent, NSLocalizedDescription=No such payment_intent: pi

Should I Use A Queueing System To Handle Payments?

拟墨画扇 提交于 2020-01-02 05:31:07
问题 I'm using Slim in conjunction with Stripe's PHP Library to process payments in my application. All is well, however up until recently, I have discovered an alarming fault in my system that I believe may be a much larger issue than I probably think. In my logic, at three separate checkpoints of the payment process I inspect the inventory in my (MySQL) database to ensure a user isn't purchasing more products than is available. However, when multiple users make a request within approximately

How to implement a Stripe Checkout custom button

点点圈 提交于 2020-01-02 04:46:08
问题 According to the documentation, Checkout supports two different integrations: Simple and Custom. The simple way works for me: **<form action="create_subscription.php" method="POST">** <script src="https://checkout.stripe.com/checkout.js" class="stripe-button" data-key="asdsdfasd3232" data-amount="2000" data-name="" data-description="2 widgets" data-image="https://s3.amazonaws.com/stripe-uploads/acct_19EnQrGHC6pu6Qvdmerchant-icon-1485553962843-logo_stripe.png" data-locale="auto"> </script> <

Parse.com + Cloud code + Android + Stripe

微笑、不失礼 提交于 2020-01-01 17:25:11
问题 My Parse cloud function after adding stripe as custom js module to parse is- main.js Parse.Cloud.define("createCustomer", function(request, response) { // var Stripe = require("stripe"); var Stripe = require("cloud/stripe.js")(kStripePrivateKey); // Stripe.initialize(kStripePrivateKey); Stripe.Customers.create( { description : request.params.description }, { success: function(httpResponse) { console.log(httpResponse); response.success(httpResponse); }, error: function(httpResponse) { console

unable to save or cancel subscriptions using Stripe

↘锁芯ラ 提交于 2020-01-01 10:02:26
问题 Using stripe's API with Ruby on Rails I am unable to save subscriptions. I am able to retrieve and update and save customer objects: customer = Stripe::Customer.retrieve(some_customer_id) #this works customer.save #this works I am also able to retrieve subscriptions: subscription=customer.subscriptions.retrieve("some_subscription_id") #this works However, when trying to save a subscription: subscription.save #this doesn't work I keep getting this: NoMethodError: undefined method `save' for #

unable to save or cancel subscriptions using Stripe

谁说我不能喝 提交于 2020-01-01 10:01:36
问题 Using stripe's API with Ruby on Rails I am unable to save subscriptions. I am able to retrieve and update and save customer objects: customer = Stripe::Customer.retrieve(some_customer_id) #this works customer.save #this works I am also able to retrieve subscriptions: subscription=customer.subscriptions.retrieve("some_subscription_id") #this works However, when trying to save a subscription: subscription.save #this doesn't work I keep getting this: NoMethodError: undefined method `save' for #

Stripe with React JS

孤街浪徒 提交于 2020-01-01 09:06:14
问题 I need to create token with Stripe.js in React JS, but I can't find any easy way. In node.js I would do something like this: stripeClient.tokens.create({ card: { number: '4242424242424242', exp_month: 12, exp_year: 2050, cvc: '123' } But the Stripe npm module doesn't work for me in React JS. I'm getting error: Cannot resolve module 'child_process' So since this is node pibrary obviously, I would like to use <script type="text/javascript" src="https://js.stripe.com/v2/"></script> But I'm not