Hot answers tagged

1

You will have to create cart to create order in Magento but you can always save the existing cart id in the customer session and set it back as customer's active cart once the customer is done with purchase with gpay.


1

Di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\OfflineShipping\Model\Carrier\Freeshipping"> <plugin name="{Your_Plugin_Name}" ...


1

Create a request to create the empty cart POST {{magento_api_url}}/rest/default/V1/guest-carts/ this will return a token which is the cart ID (e.g 'KZepbhhPiGORreBKqIRlMCywGDTyQtR4') Use that cart ID in the request which adds an item to the cart POST {{magento_api_url}}/rest/default/V1/guest-carts/KZepbhhPiGORreBKqIRlMCywGDTyQtR4/items with the payload ...


Only top voted, non community-wiki answers of a minimum length are eligible