Open
Description
Description
Hello,
I have a custom controller in Craft and I need to get the checkout session url from the price id and quantity and some custom metadata. I want to use the same logic like the checkout twig tag with php:
{% set stripeProduct = [
{
'price': priceId,
'quantity': 1,
}
]
%}
{% set stripeMetaData = {
'subcriptionHandle': subcriptionHandle,
'customer': '',
'email': email ?? '',
}
%}
{% set checkoutSession = craft.enupalStripe.checkout(stripeProduct, stripeMetaData) %}
How to achieve that?
Additional info
- Craft version: 4
- PHP version: 8.3
- Plugin version: 5.5.2
- Is SCA and Stripe Checkout enabled?: YES