#juicy28-function-arguments

1 messages · Page 1 of 1 (latest)

dawn mango
#

Hey there! You'd pass the arguments when invoking the function. There's an example on the page you linked:

$paymentIntent = \Stripe\PaymentIntent::create([
        'amount' => calculateOrderAmount($jsonObj->items),
        'currency' => 'eur',
        'automatic_payment_methods' => [
            'enabled' => true,
        ],
    ]);
#

So I'd assume that's some kind of array of cart items from your application state

steep harbor
#

Thanks for your response!I I have a single item
single price

#

I have this variable price in checkout.html
how send it from checkout.html to create.php

dawn mango
steep harbor
#

yes i copy this code
use checkout.js

#

work fine but only if use const data not wit variable

dawn mango
#

Can you share your code?