Answers for "laravel Adding shipping rate to checkout session results in "invalid array" exception"

0

laravel Adding shipping rate to checkout session results in "invalid array" exception

//Right now your code is just passing a single hash for shipping_options instead of an array, so instead of this:

        'shipping_options' => [
          'shipping_rate' => [env('SHIPPING_KEY')],
        ],
//you need to move the brackets to look like this:

        'shipping_options' => [
          ['shipping_rate' => env('SHIPPING_KEY'),],
        ],
Posted by: Guest on May-09-2022

Code answers related to "laravel Adding shipping rate to checkout session results in "invalid array" exception"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language