stripe-payments

Using Stripe Webhook to send get customer details for recurring payments using Stripe

你。 提交于 2019-12-11 17:08:52
问题 I have configured Stripe payments in my Java Spring MVC Web Application . I am able to add a Customer , create a Plan and also set up Subscriptions for the customer. Since I have recurring payments, I would like to send an email notification to Customers once an invoice is generated and also once the payment is made. From the Stripe documentations, the event types I require are invoice.upcoming. , invoice.payment_succeeded and customer.subscription.trial_will_end since I have trial period for

Subscriptions in stripe

有些话、适合烂在心里 提交于 2019-12-11 16:17:21
问题 I've read this https://stripe.com/docs/tutorials/subscriptions but don't really understand the idea of subscriptions in respect to implementation. What I need is being to charge the user but the amount of charge is to be calculated by myself because I have a special algorithm for it. So this code: # create a plan - once! Stripe::Plan.create( :amount => 2000, :interval => 'month', :name => 'Amazing Gold Plan', :currency => 'cad', :id => 'gold' ) # every month? or also once? maybe_customer =

is storing order_id via paypal payment really necessary?

你说的曾经没有我的故事 提交于 2019-12-11 15:09:18
问题 I am using paypal gateway. I am using js sdk smart payment buttons. Question 1) Turns out that when I make a payment through js, it returns me id and capture_id(id means order_id and capture_id means transaction_id ). Then I use webhooks to catch events on my back-end. Looks like it takes me lots of parsing 'links' property in it to get order_id. Is it really necessary to have order_id stored in my db? or capture id is enough to do anything? Question 2) when events arrive on my back-end,

How to block user out if trial ends but no paid subscription

守給你的承諾、 提交于 2019-12-11 15:04:42
问题 I am using stripe-webhook-middleware to handle my Stripe subscription transactions. I currently have it so the user can select their plan from a /billing page then that plan is a 14 day free trial. All this works just fine but I am wondering how I can make it so that when they log in they can't get to anything but the /billing page if their 14 days has run out and they have not added their CC details yet. I am using passport-local as my auth strategy. this is my login check code: exports

How do I style Stripe credit card fields with AngularJS integrated?

孤人 提交于 2019-12-11 14:14:59
问题 I have integrated AngularJS with a sign up form that includes Stripe. Details here: https://stackoverflow.com/a/49063641/1435711 Fiddle here: https://jsfiddle.net/JakeballBase/ubgkforL/ Only downside is the background of the Stripe fields are transparent. How do I make the background white with rounded border corners? Like this CSS style: { background-color: #fff; border: 1px solid rgba(0,0,0,0.15); border-radius: 0.25rem; padding: 0.5rem 0.375rem; } 回答1: The Stripe fields are transparent so

Parse-Server Cloud-Code and Stripe

旧巷老猫 提交于 2019-12-11 13:47:22
问题 I'm running a Parse-Server instance for a mobile web-app on Heroku. My problem is Stripe checkout plugin is working fine in my html page, but when the token is created and I call my Cloud Code it seems as if creating the variable initializing stripe does nothing. This is my cloud code. var stripe = require('stripe')('sk_test_******'); Parse.Cloud.define("pay", function(req, res){ Parse.Cloud.useMasterKey(); var token = req.params.token; var amount = req.params.amount; var email = req.params

PHP Stripe get the transaction id after successful purchase

限于喜欢 提交于 2019-12-11 12:57:03
问题 I'm trying to get the transaction ID after the purchase, but it returns empty on thankyou page order.php <?php \Stripe\Stripe::setApiKey('<test token>'); $amount = 100; $card = $_POST['stripeToken']; // Create a Customer $customer = \Stripe\Customer::create(array( "source" => $card, "email" => $email, "description" => "Example description") ); // Charge the Customer instead of the card $charge = \Stripe\Charge::create(array( "amount" => 100, "currency" => "usd", "customer" => $customer->id) )

Mock for Stripe error in Jasmine tests?

本秂侑毒 提交于 2019-12-11 11:56:46
问题 The following code is raising an error in the test environment because StripeCheckout is not defined: var handler = StripeCheckout.configure({ key: 'pk_test_...', image: '/images/marketplace.png', token: function(token) { process(token); } }); How to create a Stripe Mock? I thought something like this might work: function StripeMock(){ } StripeMock.prototype.configure = function( config ){ console.log('configure'); } var StripeCheckout = new StripeMock(); But I get TypeError: 'undefined' is

Why my service its not being correctly declared?

◇◆丶佛笑我妖孽 提交于 2019-12-11 10:57:20
问题 Im creating a Payment Service for my app with Stripe. I have: #app/services/service_error.rb class PaymentGateway::ServiceError < StandardError attr_reader :exception_message def initialize(message, exception_message: ) # Call the parent's constructor to set the message super(message) # Store the exception_message in an instance variable @exception_message = exception_message end end class PaymentGateway::CreateSubscriptionServiceError < PaymentGateway::ServiceError end And in my controller

Rails: Stripe Custom Form Won't Submit (Stripe is Double Loaded Error)

为君一笑 提交于 2019-12-11 10:55:50
问题 I've been trying for days to implement a custom Stripe form. I've followed many tutorials, and am currently following Stripe's own tutorial to a T. The error message I receive when trying to submit my form is: POST https://api.stripe.com/v1/tokens 400 (Bad Request) When expanded, this shows: Stripe.isDoubleLoaded.c @ (index):3 Stripe.isDoubleLoaded.e @ (index):3 Stripe.isDoubleLoaded.a @ (index):3 Stripe.isDoubleLoaded.Stripe.xhr @ (index):3 Stripe.a._rawRequest @ (index):2 Stripe.a.request @