Hot answers tagged

5 votes
Accepted

Stripe checkout, card declined but no frontend error

As usual it is just me being stupid. The error is accessible with: {% set error = craft.session.getFlash('error') %} {{ error }} Maybe it will help some other people.
user avatar
  • 440
4 votes
Accepted

Building a video subscription library

Just recently worked a similar project so I'll share what we've uncovered. Your needs are basically 2-fold: take payment and provide a platform where people can log into and consume content. Is ...
user avatar
  • 6,477
4 votes

Customizing Stripe payment form for Craft Commerce 2

The following code allows the customisation of the fields using Stripe Elements. This code will replace the payment form with gateway.getPaymentFormHtml({}). The thing to note here is this is ...
user avatar
4 votes
Accepted

Charge: Update subscription card details

In the end I worked out the card is related to a customer, not a subscription. I couldn't see any public endpoint to update a customer's card, so I added this method in charge/controllers/...
user avatar
3 votes

Including customer details in Stripe emails

Probably best to use Craft Commerce emails, then you can put whatever information you want into the emails to your accounts departments. Like: {{ order.billingAddress.fullName }} If the billing ...
user avatar
  • 6,682
3 votes
Accepted

Commerce 2 Stripe gateway seems to be working correctly, but order remains unpaid

The processing transaction status is used when a gateway returns from offsite correctly (the user has done everything they can to make payment on the order) but since we didn't get a definitive answer ...
user avatar
  • 6,682
3 votes
Accepted

Get Commerce 2's Stripe subscription planData as object

A subscription's planData is currently only stored as JSON. You can use that JSON in your template but you'll need to decode it first. Marion Newlevant’s Twig Perversion plugin adds a json_decode ...
user avatar
2 votes

Customizing Stripe payment form for Craft Commerce 2

OK so here's how to go about it. On checkout, you'll need at minimum a form with the following elements: <form method="post" id="card-info"> <input type="hidden" name="action" value="...
user avatar
  • 608
2 votes

input fields in getpaymentformhtml auto click out of card holder information

The getPaymentFormHtml() method will output a huge chunk of code, including Stripe's iframe and all its nested fields and functionality - you can't simply wrap that in a label element and expect it to ...
user avatar
  • 3,959
2 votes

Commerce Subscription Prices

You can use {{ subscription.subscriptionData.plan.amount }} to get the price of the plan the customer subscribed to. That returns in cents so you'll need to convert and format it. {{ (subscription....
user avatar
2 votes

Monthly subscription with Stripe using iDEAL

Have you tried having a look at the API Docs for Stripe? They have written about ideal integration: https://stripe.com/docs/sources/ideal If its in your budget you should probably also have a look ...
user avatar
2 votes
Accepted

Craft Commerce payments not going through - status "redirect"

My money is on 3D Secure, a security protocol that requires card authentication before the card can be charged. https://stripe.com/docs/payments/3d-secure So those "Redirect" orders are ...
user avatar
  • 356
1 vote

Redirect to Craft CMS Website Results in 403 "Request forbidden by administrative rules"

Update: By using http instead of https in the redirect URL. Stripe is able to successfully redirect back to my website. It would be nice to avoid this workaround and understand why using https in the ...
user avatar
  • 21
1 vote

How to differentiate EVENT_BEFORE_UPDATE_SUBSCRIPTION events in Commerce 2/3

Could you use one of the following events? \craft\commerce\stripe\services\Invoices::EVENT_BEFORE_SAVE_INVOICE \craft\commerce\stripe\services\Invoices::EVENT_SAVE_INVOICE Maybe looking in the ...
user avatar
  • 6,682
1 vote
Accepted

Import Stripe subscriptions into Commerce 3

Craft are hoping to release this as an update to Commerce in the next month or so!
user avatar
  • 438
1 vote

Craft Commerce 1 - Stripe payment intents SCA ready

The Stripe for Commerce 2 plugin has been updated for SCA, but I'm not aware of any solution for Commerce 1. https://github.com/craftcms/commerce-stripe
user avatar
  • 66.5k
1 vote

Charge Plugin - Stripe payments occasionally not being received in craft

At first glance I cannot tell you why your plugin runs intermittently. But if your plugin is interacting with Charge, there are some log functions you can use that may be helpful. craft()->...
user avatar
  • 451
1 vote

Monthly subscription with Stripe using iDEAL

Stripe Payments is available in the plugin store for Craft CMS 3. We just added support to iDEAL for one-time and recurring payments. Best,
user avatar
  • 357
1 vote

Storing data for page in twig

I'm not exactly sure how this plugin works, but in general the best way to do this is to rely on Webhooks. You can listen for charge.succeeded events and send an email when those occur. If you're ...
user avatar
  • 111
1 vote
Accepted

Commerce Stripe Authorize Only - Capture partial amount in Craft admin panel

As of Commerce 2.0.0-beta.7, partial capture is not yet supported. Look out for it in the next release.
user avatar
  • 6,682
1 vote
Accepted

Charge 2 - Stripe form fields not showing

After looking into the source code of the encrypt function, the craft.charge.setPaymentOptions() function calls mcrypt_module_get_algo_key_size and because my vagrant box (ubuntu 14.04) didn't have ...
user avatar
1 vote

Using Charge plugin with Stripe Connect

Developer of Charge here. The full details on the setup for Connect are detailed here : https://squarebit.co.uk/software/craft/charge/usage/reference/connect-setup Setting up a Charge to use ...
user avatar
1 vote
Accepted

Commerce Stripe Card Declined shows white screen with no error

Couldn't get past the white page issue so I made a simple plugin which does the following: craft()->on('commerce_transactions.onSaveTransaction', function($event) { $transaction = $event->...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible