stripe-payments

How can i create a subscription plan on a connected account in Stripe?

£可爱£侵袭症+ 提交于 2019-12-23 03:02:09
问题 I am trying to create a subscription plan on a stripe connect managed account. I tried the following code: Parse.Cloud.define("createSubscription", function (request, response) { Parse.Cloud.httpRequest({ method:"POST", url: "https://" + "sk_test_****************" + ':@' + "api.stripe.com/v1" + "/accounts/" + 'acct_**********' + "/plans/", headers: { 'Authorization': 'Basic ********************' }, body: { 'amount': 2000, 'interval': 'month', 'name': 'JPGB Plan', 'currency': 'usd', 'id':

How to fit Stripe into Backbone View?

China☆狼群 提交于 2019-12-23 02:53:21
问题 Here is the generic code for submitting a credit card form via Stripe.js. I need to fit this into the Backbone view I've pasted below: // Add Submit Btn Event Listener and Stripe Token Generator from fields jQuery(function($) { $('#payment-form').submit(function(event) { event.preventDefault(); var $form = $(this); // Disable the submit button to prevent repeated clicks $form.find('button').prop('disabled', true); Stripe.createToken($form, stripeResponseHandler); // Prevent the form from

Angular and Stripe, Can't create Card token using $http, but can using CURL

我是研究僧i 提交于 2019-12-23 02:46:15
问题 First off, please forgive me if this is considered vague, this is my first time posting to Stack Exchange. Hopefully, this is not a poorly formed question, I did give it some thought, though it assumes familiarity with CURL, Stripe and Angular. On to the problem: I am trying to recreate the results of a CURL to the Stripe API with Angular.js's $http and having some trouble doing so. Using CURL, I am able to create a card token as follows: curl -X POST https://api.stripe.com/v1/tokens \ -u MY

Storing Stripe Recurring Payment information in Database

∥☆過路亽.° 提交于 2019-12-22 23:20:42
问题 I am new to stripe payment gateway and I have created a stripe account where I have my plans and subscriptions. It is working fine. Below are my plans and subscriptions in image format. My Stripe subscription plan My Stripe Subscriptions Below is my checkout page <form action="charge.php" method="POST"> <script src="https://checkout.stripe.com/checkout.js" class="stripe-button" data-key="pk_test_ZCRfEl8XeRIbPHGIifY3THYC" data-amount="999" data-name="Demo Site" data-description="Widget" data

Capybara cannot fill Stripe Checkout.js fields

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 19:42:02
问题 I am having a difficult time testing Stripe's Checkout.js product with Capybara. The problem is Stripe has some tricky client side validation that fools Capybara's javascript driver, so when I tell Capybara to fill in a field, like this: fill_in "card_number", with: "4242424242424242" Stripe field only fills up oly the first three digits then it automatically puts a space after those digits, and that breaks Capybara badly. How can I fix this? 回答1: I don't know exactly but when i get into

Retrieve token/Create charge - Stripe

自作多情 提交于 2019-12-22 18:43:32
问题 This might be a stupid question but here we go. I've set up Stripe Elements (https://stripe.com/docs/elements) to collect credit card info, and tockenize it. Now I'm trying to set up charges, but I'm unsure of how to set up my "server-side" code. Submitting the form in my controller.js: function stripeTokenHandler(token) { // Insert the token ID into the form so it gets submitted to the server var form = document.getElementById('payment-form'); var hiddenInput = document.createElement('input'

Why Stripe API is not working on live website?

走远了吗. 提交于 2019-12-22 14:14:15
问题 I'm trying to use Stripe to handle some payments on a little website. In local, everything works great : all my tests are good. The problem is in live website : I can get a token (from javascript) but the \Stripe\Charge::create in the php side is buggy and I can't figure out why. Here's some infos : # Making Stripe works require_once(dirname(__FILE__).'/stripe/init.php'); # Set API Key (Both Live and Test keys don't work) \Stripe\Stripe::setApiKey("sk_test_****"); # Trying to charge # $token

Can certain URLs be exempt from CSRF in sails.js?

戏子无情 提交于 2019-12-22 11:17:16
问题 I'm setting up Stripe to work with my sails.js server, and in order to use Stripe's webhooks, I need to disable CSRF for the URLs I provide to Stripe. Is it possible to make certain URLs exempt from CSRF POST requirements in sails.js? The only configuration I can find for CSRF is to turn it on globally, and looking through the source code for the csrf hook (https://github.com/balderdashy/sails/blob/master/lib/hooks/csrf/index.js) it looks like if I try to provide a custom object, it just gets

Update Stripe module at Parse Cloud Code

余生颓废 提交于 2019-12-22 09:32:30
问题 Turns out that Stripe module at Parse Could Code is out of date and won't be updated. Source: https://developers.facebook.com/bugs/523104684492016/ Parse modules are using an old version of the API and there is no plan to update it in the near future. As a workaround please download the newer SDKs directly off the third party site, place it in "cloud/" folder and import it using require(); We're going to close this by design. I have downloaded Stripe module via terminal with command npm

Stripe Simple Checkout Custom Data Field

南楼画角 提交于 2019-12-22 08:59:28
问题 I am trying to use Stripe's simple checkout system. I want to include a custom field so that I can match an item_id to an order in my database. https://stripe.com/docs/checkout#integration-simple They don't seem to mention it in their documentation but it seems pretty essential for online services. How do I attach a custom id field that will be recorded with the order? echo '<form action="/charge" method="POST">'; echo '<script '; echo 'src="https://checkout.stripe.com/checkout.js" class=