GithubHelp home page GithubHelp logo

enupal / stripe Goto Github PK

View Code? Open in Web Editor NEW
33.0 4.0 19.0 3.04 MB

Allows customers sign up for recurring and one-time payments with Stripe, perfect for orders, donations, subscriptions, and events. Create simple payment forms in seconds easily without coding. For Craft CMS

Home Page: https://enupal.com/craft-plugins/stripe-payments/

License: Other

PHP 54.06% CSS 2.02% JavaScript 7.21% HTML 0.49% SCSS 6.28% Twig 24.29% Less 5.66%
craft-plugin craftcms stripe recurring-payments subscriptions payment ecommerce checkout

stripe's Introduction

Stripe Payments for Craft CMS

Stripe Payments Plugin for Craft CMS

Stripe Payments allows customers sign up for recurring and one-time payments with Stripe, perfect for orders, donations, subscriptions, and events. Create simple payment forms in seconds easily without coding. For Craft CMS

Screenshot

Features

Start accepting one-time and recurring payments on your Craft CMS site

  • One line of Code: {{ craft.enupalStripe.paymentForm('handle') }}
  • Stripe Payments full tutorial
  • Cart API: A collection of endpoints to retrieve, add, update, clear items, and checkout a Cart
  • Checkout twig tag: Build any checkout page, display multiple Price items (one-time, recurring), super secure, user-friendly, multiple payment methods, taxes, shipping, Apple and Google Pay, with just a few lines of twig code
  • Secure Payment Processing powered by Stripe Checkout and Stripe Elements
  • Stripe Elements: Card, iDEAL and SOFORT.
  • Strong Customer Authentication (SCA) ready with the new Stripe Checkout
  • Apple Pay support with the new Stripe Checkout
  • Optimized for Mobile
  • Subscriptions Integration: Allow your customers to sign up for recurring payments.
  • Cancel/Reactivate Subscription via CP and Front-end
  • Support for Metered billing plans
  • Redeem Coupons on one-time and recurring payments
  • Refund button in the CP
  • Applying Taxes to Subscriptions
  • Basic Payment Form Builder: Add field types to capture more data to store with each Stripe Order record: Single Line, Paragraph, numbers, Dropdowns, checkboxes.
  • Custom Amounts: Allow your customers to pay what they want by entering an amount. Perfect for single and recurring donation or any custom payment form.
  • Manage Payment Forms
  • Multi-Language Support: Stripe Checkout supports 12 languages and the ability to autodetect the current language of the visitor
  • Support 135+ currencies
  • View orders in your control panel
  • Send out email notifications for admins and customers
  • Inventory management for each Payment Form
  • Stripe Test and Live accounts
  • Events: After Order Create, Before Send Email, After Refund Order and After Process Webhook
  • Field type
  • Export Orders in CSV, XLS, XLS or ODS format
  • Template Overrides
  • Stripe Connect: build a marketplace, and pay out sellers or service providers globally new

Documentation

https://docs.enupal.com/stripe-payments/

Stripe Payments Support


Brought to you by enupal

Enupal

stripe's People

Contributors

andrelopez avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stripe's Issues

Store keys in `.env` file

It would be ideal if we could store our Stripe keys (both Publishable & Secret) in our local .env file. Additionally, it would be nice to store the current Mode as well. Basically, all values in this screenshot should be storable in the .env file...

stripe keys

There are two excellent reasons for this:

  1. Security. Keeping those keys in the database is technically a security risk. Database exports can get passed around with little regard to the data stored inside.

  2. Safety. I'd like to guarantee that the production server only knows and cares about the Live keys, and the staging and local sites only care about the Test keys. If either of those got mixed up, it would be bad news.

Making sure that we switch from Live to Test (and switch the keys appropriately) every time we pull down a copy of the database is really not sustainable.

Fortunately, this is really easy to do in Craft 3! Here's how I've done it...

https://github.com/doublesecretagency/craft-cpcss/blob/v2/src/CpCss.php#L81
https://github.com/doublesecretagency/craft-cpcss/blob/v2/src/templates/settings.twig#L19-L20

Feel free to ping me with questions! Thanks! 🙂

Form not working at all

Description

I'm migrating across from lukeyouell/craft-stripecheckout as the plugin is dead, and we need support for SCA.
No matter what I do, I can't get this plugin to work.
I've set up a payment and am displaying it on the frontend as follows:

{% set options = {amount: payment_amount, quantity: 1, calculateFinalAmount: true} %} {{ craft.enupalstripe.paymentForm('buySent', options) }}

The "Pay by card" button shows, but if I click it - I get a Unable to process the Payment error.

I've noticed that in the amount/token fields arn't being populated, as you can see - but can't work out why.
image

I've got SCA enabled, and trying to use Stripe checkout

Additional info

  • Craft version: 3.3.1.2
  • PHP version: 7.2
  • Database driver & version: mySQL 5.7.20
  • Plugin version: 2.0.6

"Unable to get payment intent" in finish-order controller action

Description

I have a subscription single plan payment form using stripe checkout. Running in test mode, I complete the checkout successfully, but in my logs I get the following errors (this results in a redirect to '/', which resulted in my redirect URLs not working):

2019-09-07 17:17:50 [-][16577][-][trace][yii\web\Application::handleRequest] Route requested: 'enupal-stripe/stripe/finish-order'
2019-09-07 17:17:50 [-][16577][-][trace][yii\base\Controller::runAction] Route to run: enupal-stripe/stripe/finish-order
2019-09-07 17:17:50 [-][16577][-][trace][yii\base\InlineAction::runWithParams] Running action: enupal\stripe\controllers\StripeController::actionFinishOrder()
2019-09-07 17:18:16 [-][16577][-][error][enupal\stripe\services\PaymentIntents::getPaymentIntent] Unable to get payment intent: Could not determine which URL to request: Stripe\PaymentIntent instance has invalid ID: 
2019-09-07 17:18:16 [-][16577][-][error][enupal\stripe\controllers\StripeController::actionFinishOrder] Unable to find the payment intent id: 
2019-09-07 17:17:50 [-][16577][-][info][application] $_GET = [
    'session_id' => 'cs_test_XXX'
]

The orders appear in the admin, and everything is registered in Stripe successfully.

I'm running in test mode, with SCA enabled, testing with the test card in the docs (4000 0000 0000 3220).

Steps to reproduce

  1. Created a payment form with
  • Subscription payment enabled
  • Single plan
  • Auto-detect locale
  • Stripe Checkout enabled
  • Everything else default
  1. Output payment form in template with {{ craft.enupalStripe.paymentForm('myhandle') }}.
  2. Click button and proceed with checkout.
  3. When checkout is completed, I'm returned to the frontpage of the site, with the error above in the logs.

Additional info

  • Craft version: 3.3.1.1
  • PHP version: 7.3.8
  • Database driver & version: Mysql 5.7.26
  • Plugin version: 2.0.3

Cannot get plug in working on windows. Works fine on mac.

Description

I've spent the entire day trying to understand why, when a colleague installs this plug in, the migrations all run correctly but do not for me.

The only difference (same codebase, same database) is I'm on windows (Laravel Homestead) and he's on Mac (using Laravel Valet).

We are both on the same versions of mysql & php.

The problem seems to be that the plug in just refuses to create the field_subscriptionPlan_ * fields.

image

That screen grab is from my friends matrixcontent_enupalmultipleplans table.

This screen grab is from mine.

image

I can't work out in the source code why this isn't working.

I've checked the error logs, I've scrutinized the mysql queries, I've dived into the source as much as I can and I can't work it out.

Additional info

  • Craft version: 3.2.9
  • PHP version: PHP 7.3.8-1+ubuntu18.04.1+deb.sury.org+1 (cli
  • Database driver & version: 8.0.17 - MySQL Community Server - GPL
  • Plugin version: 2.0.6

This is related to #37 - which gives you an idea of how long and how frustrating I've found this problem. ANY help appreciated.

Checkout redirect URLs not working

Description

I've added "Checkout Success URL" and "Checkout Cancel URL" to my payment form (subscription, single plan), but when completing the Stripe Checkout process, I'm sent to the site's homepage instead of the url's I've specified.

I've set my success url to /user/thanks?number={number} and my cancel url to /user/cancel. I can access the url's fine if I just enter them in my browsers url bar.

Steps to reproduce

  1. Create a payment form using Stripe Checkout.
  2. Add a success URL.
  3. Complete a successful checkout.

Additional info

  • Craft version: 3.3.1.1
  • PHP version: 7.3.8
  • Database driver & version: Mysql 5.7.26
  • Plugin version: 2.0.3

Include Dynamic Metadata?

Is it possible to include dynamic metadata when submitting payments?

I tried including this in my payment form:

<input type="text" name="enupalStripe[metadata][DynamicallyGeneratedDetail]" value="Lorem ipsum dolor sit amet">

But it looks like it won't include it in the payment without adding fields specifically to the payment form.

Two different forms on same template won't work.

Description

I am trying to show two different subscription forms on the same page, i.e one with card option and another with checkout.
But it shows error.

Screenshot from 2019-09-03 17-25-53

Steps to reproduce

1.create two form one with card option another with checkout process
2. Call the forms on a single template and try to use them both.

Additional info

  • Craft version:3.3
  • PHP version:7.0
  • Plugin version:2.0.1

Add ability to use custom HTML in payment form

I would like to customize payment form more than that it's possible with CSS.

Please add a template variable to access unrendered form object, or add ability to override the form template with a custom one

Swift_RfcComplianceException

Plugin version: 1.5.2
Craft version: 3.0.25

Looks like the "Reply To" email address needs to be required...

fields

Otherwise you'll trigger this error when making a purchase...

error

Which traces back to this code...

stack trace

Currency symbol mismatch

Description

SVG chart created on the Orders page is not displaying the selected currency we prefer.

Instead it's defaulting to British Pound symbol.

Currency

Are we missing a setting variable somewhere?

Steps to reproduce

  1. Set "Global Currency" as AUD
  2. Set form currency as AUD
  3. Make dummy transactions
  4. View orders chart on Stripe Payments > Orders page

Additional info

  • Craft version: Craft CMS 3.1.21.1
  • PHP version: 7.2.14
  • Database driver & version: MySQL 5.7.25
  • Plugin version: 1.8.5

Show Shipping Address on CSV Export instead of "shippingAddressId"

Description

Currently when you export via CSV, the sheet lists the Shipping Address with an id. It'd be helpful to actually list out the shipping address in a few columns (street, city, state, zip) so we can use the CSV to import into another program to manage shipments.

Steps to reproduce

  1. Export CSV in dashboard
  2. Look at CSV

Additional info

  • Craft version: 3.1.18
  • PHP version: 7.1
  • Database driver & version:
  • Plugin version: 1.8.2

Upgraded to 3.2 and getting an error "At least one block type is required."

Description

Just upgrade a site to 3.2.6 & the latest version of this plug in (1.9.8). All seemed fine (testing on the front end and test payments going through no problem).

Only issue is when I access any payment form either and existing one or a new one I get:

image

(My local url when this error comes up is http://clientdomain.test/admin/enupal-stripe/forms/edit/3607)

Steps to reproduce

  1. In the dashboard, create or edit a payment form.

Additional info

  • Craft version: 3.2.7
  • PHP version: 7.2.20
  • Database driver & version: MySQL 5.7.27
  • Plugin version: 1.9.8

Error when using export

Description

Getting error when using the new export function:
Error Info: Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'enupalstripe_orders.id' in 'field list'
)

The SQL being executed was: SELECT enupalstripe_orders.id AS orderId, formId, userId, testMode, paymentType, number ...

Steps to reproduce

  1. Export > CSV

Additional info

  • Craft version: Craft Pro 3.1.19
  • PHP version: 7.2.16
  • Database driver & version: MySQL 5.7.25
  • Plugin version: 1.8.3

Hitting Stripe limits when performing guest subscriptions

On the website I'm working on, the plugin is used to process subscription payments in Stripe, however it is not required for customer to be logged in.

This is recurring donation, and no user account is created in Craft, just the Stripe subscription.

However soon after launch of this feature I started getting error: Customer cus_EBUpBMEzFUKEwO already has the maximum 25 current subscriptions

It appears that though email address is being captured, all guest purchases are being sent to Stripe as 'Guest' customer (whatever the email address is).

So in order to make things for for me, I'd need the plugin to create new Stripe customer for each different email address used.

Do you think this is something you could add?

Custom Statuses

Add to support to create custom statuses from the plugin settings

Adding quantity for reoccurring payments

Description

Is there a way to add quantities for reoccurring payment plans?
I am trying to enable my customers to choose how many plans they want to subscribe to and pay X amount per plan. I have set it up properly on the Stripe dashboard but can't seem to find how it will work with the plugin...

Additional info

  • Craft version: Craft Pro 3.0.12
  • PHP version: 7.0.32
  • Database driver & version: MySQL 5.7.24
  • Plugin version: 1.5.7

Support for Strong Customer Authentication

Am I right in thinking this plugin doesn’t yet support SCA via the payment intents API? If not, is that likely to be added before SCA kicks in in mid-September?

I’m not actually using the plugin yet. I have a Craft 2 + Charge project and I need to figure out which migration route will be the least painful. Since this plugin offers syncing for old orders that sounds promising.

Thanks.

Wrong language code for Norwegian

Description

When selecting "Norwegian" in the language selector, Stripe throws an error during the enupal/stripe/create-checkout-session controller action:

"Invalid locale: must be one of auto, da, de, en, es, fi, fr, it, ja, nb, nl, pl, pt, sv, or zh"

The language selector sets the locale to no (which is the ISO country code), while the language code for Norwegian is nb.

Steps to reproduce

  1. Create a new payment form using Stripe Checkout.
  2. Select Norwegian as language.
  3. Output form in template and click to pay.

Error is shown in the JS console.

Additional info

  • Craft version: 3.3.1.1
  • PHP version: 7.3.8
  • Database driver & version: Mysql 5.7.26
  • Plugin version: 2.0.3

Support for Stripe coupon codes

I have submitted couponCode field together with form using coupon as set up in Stripe.
However it does not seem like the coupon came though.

Unless I'm doing something wrong, please accept using Stripe coupons as feature request

Order not available in customer.subscription.created webhook

Description

Not sure if this is a bug or not, but when listening for webhook events, $event->order is not set for customer.subscription.created/customer.subscription.update (and most other events). I've resorted to listening for checkout.session.completed, and checking that it's a subscription I'm receiving the event for. Which may be the correct way, but I got a bit thrown off-track by the example here:

https://enupal.com/craft-plugins/stripe-payments/docs/plugin-development/events#afterprocesswebhook

Since the check for customer.subscription.created is inside if ($order), it will never be run. If this is not a bug, I think the example should be updated.

Steps to reproduce

(same use-case and setup as my other issues today)

Additional info

  • Craft version: 3.3.1.1
  • PHP version: 7.3.8
  • Database driver & version: Mysql 5.7.26
  • Plugin version: 2.0.3

Multiple issues with subscriptions

Description

We just went live with a subscription website using Checkout and I'm seeing a bunch of very weird issues, not sure if they're related or not, but kinda feels like it:

  1. We have set up 25% tax, but only about half of the subscriptions haven't had tax added to them.

  2. A lot of the incoming invoices are being marked as "Scheduled", while others are paid immediately. Some have tax, som don't.

  3. Not all orders are showing up in stripe payments in the control panel. None of the scheduled ones, but also some of the ones that are paid.

Somehow, this feels kinda related, like a lot of requests are just being partly completed? Any idea what the issue could be?

Additional info

  • Craft version: 3.1.33
  • PHP version: 7.2.19
  • Database driver & version: MySQL 8.0.16
  • Plugin version: 1.9.5

Form fields tab is empty

Description

When I edit a new Payment form, the Form Fields tab is empty.
This causes an error when trying to view a form on the front-end;

Calling unknown method: enupal\stripe\elements\PaymentForm::enupalStripeBasicFields()

Steps to reproduce

  1. Edit a Payment Form
  2. Click on Form Fields Tab
  3. See nothing
  4. No profit

Additional info

  • Craft version: 3.0.32
  • PHP version: 7.1
  • Database driver & version: MySQL
  • Plugin version: 1.5.10

Wrong Order Total when using more than 1 currency in separate forms

Description

It looks like the Order total is only calculated ( maybe hardcoded) in USD,
However when creating payment forms with other currencies, the total is not estimate in USD accordingly by converting the value from the form currency to USD.

Could it be possible to filter the total based on each currency ? then maybe have an option to estimate all transactions from different currencies converted to USD?

Steps to reproduce

  1. Create 2 forms (1 in USD, 1 in another currency)
  2. Make more than 1 payments in each
  3. Go to the order total page to see the payments
  4. The Total revenue will not be accurate

Additional info

  • Craft version: Craft Solo 3.0.26.1
  • PHP version: 7.2.9
  • Database driver & version: MySQL 5.6.41
  • Plugin version: 1.5.5

Deprecation Warnings

craft/vendor/enupal/stripe/src/templates/_frontend/multipleplans/radio.twig:9
craft/vendor/enupal/stripe/src/templates/_frontend/paymentForm.twig:32
craft/vendor/enupal/stripe/src/services/Orders.php:547
craft/vendor/enupal/stripe/src/templates/_frontend/multipleplans/dropdown.twig:12

Looping through element queries directly has been deprecated. Use the all() function to fetch the query results before looping over them.

Additional info

  • Craft version: 3.1.x
  • PHP version: 7.2.x
  • Plugin version: 1.7.1

Creating new payment form

Description

When I try to create a new Payment Form I immediately get this error;

Key "0" does not exist as the array is empty.

in /home/vagrant/sites/xxxxx/vendor/enupal/stripe/src/templates/forms/_edit.twig
19: {% set tab = stripeForm.getFieldLayout().getTabs()[0] %}

I think this happened when I updated to Craft 3.0.32

Steps to reproduce

  1. Click on New Payment Form
  2. Get error

Additional info

  • Craft version: 3.0.32
  • PHP version: 7.1
  • Database driver & version: MySQL
  • Plugin version: 1.5.10

Queue job fails when syncing subscription orders

Description

I'm trying to sync in existing orders for subscriptions from Stripe, but get the following error:

2019-09-07 23:07:08 [-][1][-][error][craft\queue\QueueLogBehavior::afterError]  [1] Syncing Subscription Orders (attempt: 1) - Error (time: 1.394s): Call to a member function format() on bool
2019-09-07 23:07:08 [-][1][-][error][Error] Error: Call to a member function format() on bool in /mypath/vendor/enupal/stripe/src/jobs/SyncSubscriptionPayments.php:134
Stack trace:
#0 /mypath/vendor/yiisoft/yii2-queue/src/Queue.php(214): enupal\stripe\jobs\SyncSubscriptionPayments->execute(Object(craft\queue\Queue))
#1 /mypath/vendor/yiisoft/yii2-queue/src/cli/Queue.php(147): yii\queue\Queue->handleMessage('1', 'O:43:"enupal\\st...', '3600', 1)
#2 /mypath/vendor/craftcms/cms/src/queue/Queue.php(96): yii\queue\cli\Queue->handleMessage('1', 'O:43:"enupal\\st...', '3600', 1)
#3 /mypath/vendor/craftcms/cms/src/controllers/QueueController.php(86): craft\queue\Queue->run()
#4 /mypath/vendor/craftcms/cms/src/controllers/QueueController.php(106): craft\controllers\QueueController->actionRun()
#5 [internal function]: craft\controllers\QueueController->actionRetry()
#6 /mypath/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#7 /mypath/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#8 /mypath/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('retry', Array)
#9 /mypath/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('retry', Array)
#10 /mypath/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('queue/retry', Array)
#11 /mypath/vendor/craftcms/cms/src/web/Application.php(566): craft\web\Application->runAction('queue/retry', Array)
#12 /mypath/vendor/craftcms/cms/src/web/Application.php(278): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#13 /mypath/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#14 /mypath/web/index.php(21): yii\base\Application->run()
#15 {main}

The line that fail is:

$newOrder->dateOrdered = DateTimeHelper::toDateTime($invoice['date'])->format('Y-m-d H:i:s');

I logged $invoice, and there is no key date. There is created though, and if I change the line above to $invoice['created'], the job works. No idea if this is the case for all types of orders though.

Steps to reproduce

...

Additional info

  • Craft version: 3.3.1.1
  • PHP version: 7.3.8
  • Database driver & version: Mysql 5.7.26
  • Plugin version: 2.0.4

Coupon error despite not using coupons

Description

I'm using Stripe Checkout with SCA support and trying to do some extra processing after the order complete event but running into problems where it's not firing. Debugging showed that the $event was empty.

When examining my logs i see the following error pertaining to an unrecognised coupon code despite not using any coupons

2019-09-15 17:55:25 [-][1][-][error][application] Unable to find the Coupon ID:
2019-09-15 17:55:25 [-][1][-][error][enupal\stripe\models\CouponRedeemed::addErrorMessage] The coupon is no longer valid
2019-09-15 17:55:25 [-][1][-][info][application] $_GET = [
'p' => 'me/payment/enupal/stripe/create-checkout-session'
]

The order is placed and shows as being complete in the dashboard but I'm unable to perform any further processing. I think this error is causing a cascade of "Headers already sent" errors which prevents the next steps.

The methods I'm using were apparently working OK prior to updating to the version with SCA support.

Steps to reproduce

  1. Make a Stripe payment using Checkout and SCA support
  2. Examine Craft's php error log

Additional info

  • Craft version: 3.3.3
  • PHP version: 7.1.32
  • Database driver & version: MySQL 5.7.27
  • Plugin version: 2.0.6

Typo

Output for the interval field label has a typo when set to daily.

Make this a dayly payment

Bug when one-time setup fee to subscriptions is 0

Description

This commit introduces a critical bug that breaks Stripe Checkout in 2.0.4 if there is no setup fee for a sca enabled, single plan subscription. The bug happens in when the create-checkout-session controller action is called, and the error in the javascript console is "Invalid positive integer".

The error in the log with the stacktrace is:

2019-09-07 22:12:01 [-][16577][-][error][Stripe\Error\InvalidRequest] Stripe\Error\InvalidRequest: Invalid positive integer in /mypath/vendor/stripe/stripe-php/lib/ApiRequestor.php:210 from API request 'req_XXXXX'
Stack trace:
#0 /mypath/vendor/stripe/stripe-php/lib/ApiRequestor.php(173): Stripe\ApiRequestor::_specificAPIError('{\n  "error": {\n...', 400, Object(Stripe\Util\CaseInsensitiveArray), Array, Array)
#1 /mypath/vendor/stripe/stripe-php/lib/ApiRequestor.php(473): Stripe\ApiRequestor->handleErrorResponse('{\n  "error": {\n...', 400, Object(Stripe\Util\CaseInsensitiveArray), Array)
#2 /mypath/vendor/stripe/stripe-php/lib/ApiRequestor.php(126): Stripe\ApiRequestor->_interpretResponse('{\n  "error": {\n...', 400, Object(Stripe\Util\CaseInsensitiveArray))
#3 /mypath/vendor/stripe/stripe-php/lib/ApiOperations/Request.php(57): Stripe\ApiRequestor->request('post', '/v1/checkout/se...', Array, Array)
#4 /mypath/vendor/stripe/stripe-php/lib/ApiOperations/Create.php(23): Stripe\ApiResource::_staticRequest('post', '/v1/checkout/se...', Array, NULL)
#5 /mypath/vendor/enupal/stripe/src/services/Checkout.php(111): Stripe\Checkout\Session::create(Array)
#6 /mypath/vendor/enupal/stripe/src/controllers/CheckoutController.php(39): enupal\stripe\services\Checkout->createCheckoutSession(Object(enupal\stripe\elements\PaymentForm), Array)
#7 [internal function]: enupal\stripe\controllers\CheckoutController->actionCreateSession()
#8 /mypath/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /mypath/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /mypath/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('create-session', Array)
#11 /mypath/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('create-session', Array)
#12 /mypath/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('enupal-stripe/c...', Array)
#13 /mypath/vendor/craftcms/cms/src/web/Application.php(566): craft\web\Application->runAction('enupal-stripe/c...', Array)
#14 /mypath/vendor/craftcms/cms/src/web/Application.php(278): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#15 /mypath/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#16 /mypath/web/index.php(21): yii\base\Application->run()
#17 {main}

Here is a dump of the parameters passed to Session::create($sessionParams) in line 112 of Checkout.php:

[
    'payment_method_types' => [
        0 => 'card'
    ]
    'success_url' => 'http://mydomain.test/enupal/stripe-payments/finish-order?session_id={CHECKOUT_SESSION_ID}'
    'cancel_url' => 'http://mydomain.test/user/cancel'
    'subscription_data' => [
        'items' => [
            0 => [
                'plan' => 'plan_FlAu6aKKl9v3fM'
                'quantity' => 1
            ]
        ]
        'metadata' => [
            'stripe_payments_form_id' => '54268'
            'stripe_payments_user_id' => '16577'
            'stripe_payments_quantity' => 1
            'stripe_payments_coupon_code' => ''
            'stripe_payments_amount_before_coupon' => '9900'
        ]
    ]
    'line_items' => [
        0 => [
            'amount' => 0
            'currency' => 'NOK'
            'name' => 'One time set-up fee'
            'quantity' => 1
        ]
    ]
    'customer' => 'cus_XXXXX'
    'locale' => 'auto'
]

The problem is most likely this conditional which will always be true, because the value if set to 0, is '0.000'.

Steps to reproduce

(Again, see my other issues)

Additional info

  • Craft version: 3.3.1.1
  • PHP version: 7.3.8
  • Database driver & version: Mysql 5.7.26
  • Plugin version: 2.0.4

[Bug] Bad link in default email template

We're on an old version (v1.5.4), so apologies if this has already been fixed.

It looks like the "READ MORE" link in the default receipt emails is pointing to a bogus link...

2019-02-08 at 12 08 20 pm

We'll probably switch to a custom template anyway... but just wanted to bring that to your attention.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.