Closed Noido closed 2 years ago
Hi how i can create a checkout with api
i try like that
$shop = Auth::user(); $request = $shop->api()->rest('POST', '/admin/api/2021-10/checkouts.json', [ 'checkout' => 'variant_id:{$request->variant_id},quantity:1' ]); var_dump($request);
$shop = Auth::user();
$request = $shop->api()->rest('POST', '/admin/api/2021-10/checkouts.json', [
'checkout' => 'variant_id:{$request->variant_id},quantity:1'
]);
var_dump($request);
but not work, i think something is wrong $shop is the good shop and $request->variant_id have good id so not the problem
Thanks for help
This is an issue with your code and shopify's requirements. Please move this to the discussions tab if you want some help.
Hi how i can create a checkout with api
i try like that
$shop = Auth::user();
$request = $shop->api()->rest('POST', '/admin/api/2021-10/checkouts.json', [
'checkout' => 'variant_id:{$request->variant_id},quantity:1'
]);
var_dump($request);
but not work, i think something is wrong $shop is the good shop and $request->variant_id have good id so not the problem
Thanks for help