stripe-payments

How to get charge id after creating a subscription using Stripe?

被刻印的时光 ゝ 提交于 2019-12-21 03:42:55
问题 I am using Stripe as a payment gateway. Now there's a big problem bothers me. I used code below to create a subscription: <?php require_once('lib/Stripe.php'); Stripe::setApiKey(API_KEY); $token = $_POST['stripeToken']; $customer = Stripe_Customer::create(array( "card" => $token, "plan" => $_POST['plan'], "email" => "fakeuser@gmail.com", )); This works fine, but I can not get Charge ID from $customer , and I found out there's no way in Stripe API to get it. How to get it when creating a

Stripe: downgrade a user at “period end”

回眸只為那壹抹淺笑 提交于 2019-12-20 17:33:32
问题 Is it possible to downgrade a user at period end instead of immediately? I've combed through the API Docs but haven't been able to figure out how to accomplish this. As a workaround I'm currently immediately canceling the user's subscription, then subscribing them to the lesser subscription, trialing until the end of the month. This won't work though - I need to be able to delay the downgrade until the period end (but "record" it w/ Stripe at the time the downgrade is requested). Clearly

How to Receive Webhook from Stripe in Java

空扰寡人 提交于 2019-12-20 15:38:29
问题 I am trying to receive a webhook via a post request from Stripe Payments. The java method to process it looks like this: @ResponseBody @RequestMapping( consumes="application/json", produces="application/json", method=RequestMethod.POST, value="stripeWebhookEndpoint") public String stripeWebhookEndpoint(Event event){ logger.info("\n\n" + event.toString()); logger.info("\n\n" + event.getId()); return null; } But the Stripe Event always comes back with all null values: <com.stripe.model.Event

Android - “Manifest Merger Failed” Error after implementing Stripe library

青春壹個敷衍的年華 提交于 2019-12-20 04:48:32
问题 i implemented 'com.stripe:stripe-android:8.5.0' into my app gradle, and then i got the following error trying to build my project: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android

Django-stripe-paymants and eldarion-ajax subscribe JSON response

Deadly 提交于 2019-12-19 10:12:26
问题 I am working with Django-stripe-paymants and it's working except for handling the JSON response after the subscribe form is completed. They payment is processed and the web hooks look good. But it is just showing the JSON is browser window. ie: {"html": "\n\n\n<div class=\"subscribe-form\">\n <h2>Purchase a Subscription..... I imagine there is something small missing in the Java script, but am stuck. I have read through the documentation a few times and searched around for a solution. The

Stripe API error when passing application_fee

◇◆丶佛笑我妖孽 提交于 2019-12-19 05:47:20
问题 I am trying to collect an application fee using the Stripe API. I am sure I am missing something in the request. Stripe complaints that it needs either of these: OAuth key, the Stripe-Account header, or the destination parameter. I am passing in the Stripe-Account header. Could you please point me into the right direction? Here is my curl request: curl https://api.stripe.com/v1/charges \ -u sk_test_<key>: \ -H "Stripe-Account: acct_<key>" \ -d amount=2000 -d currency=usd -d capture=true \ -d

Is it possible to integrate Stripe With Firebase and with iOS?

假装没事ソ 提交于 2019-12-18 19:16:15
问题 I've been querying on Google on how to do this - iOS to Stripe. I got a project that uses an online database and I've been doing it solo (it's almost done) so I used Firebase. I was so lucky to find this BaaS and time passed, I only need to integrate a payment feature to this iOS app and I am done. I am not a web developer/backend dev and I only focus on iOS development, so the problem is that I can't start implementing a payment feature. I didn't consider using Braintree, for I know that it

Getting Last4 Digits of Card using Customer Object - Stripe API with PHP

混江龙づ霸主 提交于 2019-12-18 18:53:09
问题 I want to get the last 4 digits of a customers card using Stripe. I have already stored the Customer using: // Get the credit card details submitted by the form $token = $_POST['stripeToken']; // Create a Customer $StripeCustomer = \Stripe\Customer::create(array( "description" => "$username", "card" => $token )); Now I'd like to access and then store the card's last 4 digits. (For context, I want to show users which card they have stored using Stripe for future payments - this is not a

Properly Using Firebase Cloud Functions and Stripe

假如想象 提交于 2019-12-18 17:29:52
问题 I am trying to use Firebase Cloud functions and Stripe, and iOS (Swift). I want to use Firebase Cloud functions to perform the card charge as is required by Stripe. I am trying to use this example: Firebase Stripe Example I uploaded the example they gave, but I need to modify the charge function slightly. I tried setting it to the file path I have in my real time data base, but I am not sure how to modify the entire thing so that It will work off of my realtime database structure. Such as

Cannot conform to STPAddCardViewControllerDelegate since Xcode 8 GM on Swift 3

℡╲_俬逩灬. 提交于 2019-12-18 09:49:16
问题 Since converting my codebase to swift 3 with Xcode 8 GM, I get this error when trying to conform to the STPAddCardViewControllerDelegate (Stripe SDK). I'm very surprised by this error because even when stubbing those methods automatically with Xcode I encounter the same error. Types seem to match, no idea what's going on. extension ViewController: STPAddCardViewControllerDelegate { func addCardViewControllerDidCancel(_ addCardViewController: STPAddCardViewController) { } func