app/code/Magento/InstantPurchase/README.md
This module allows the customer to place the order in seconds without going through full checkout. Once clicked, system places the order using default shipping and billing addresses and stored payment method. Order is placed and customer gets confirmation message in the notification area.
For information about a module installation, see Enable or disable modules.
PaymentMethodsIntegration/ - directory that contains interfaces and basic implementation of integration vault payment method to the instant purchase.
For information about a typical file structure of a module, see Module file structure.
Extension developers can interact with this module. For more information about the extension mechanism, see Plugins.
The dependency injection mechanism enables you to override the functionality of this module.
\Magento\InstantPurchase\Model\BillingAddressChoose\BillingAddressChooserInterface
\Magento\InstantPurchase\Model\PaymentMethodChoose\PaymentTokenChooserInterface
\Magento\InstantPurchase\Model\ShippingAddressChoose\ShippingAddressChooserInterface
\Magento\InstantPurchase\Model\ShippingMethodChoose\DeferredShippingMethodChooserInterface
\Magento\InstantPurchase\Model\ShippingMethodChoose\ShippingMethodChooserInterface
\Magento\InstantPurchase\Model\InstantPurchaseInterface
\Magento\InstantPurchase\PaymentMethodIntegration\AvailabilityCheckerInterface
\Magento\InstantPurchase\PaymentMethodIntegration\PaymentAdditionalInformationProviderInterface
\Magento\InstantPurchase\PaymentMethodIntegration\PaymentTokenFormatterInterface
For information about a public API, see Public interfaces & APIs.
Almost all aspects of instant purchase may be customized. See comments to classes and interfaces marked with @api tag.
All payments created for instant purchase also have 'instant-purchase' => true in addition information. Use this only if all other customization points are not suitable,
Instant purchase support may be implemented for any payment method with vault support.
Basic implementation provided in Magento\InstantPurchase\PaymentMethodIntegration should be enough in most cases. It is not enabled by default to avoid issues on production sites and authors of vault payment methods should verify correct work for instant purchase manually.
To enable basic implementation, just add a single option to the configuration of the payment method in config.xml:
<instant_purchase>
<supported>1</supported>
</instant_purchase>
Basic implementation is a good starting point, but it's recommended to provide your own implementation to improve user experience. If instant purchase integration has customization, then the supported option is not required.
<instant_purchase>
<available>Implementation_Of_Magento\InstantPurchase\PaymentMethodIntegration\AvailabilityCheckerInterface</available>
<tokenFormat>Implementation_Of_Magento\InstantPurchase\PaymentMethodIntegration\PaymentTokenFormatterInterface</tokenFormat>
<additionalInformation>Implementation_Of_Magento\InstantPurchase\PaymentMethodIntegration\PaymentAdditionalInformationProviderInterface</additionalInformation>
</instant_purchase>
Magento\InstantPurchase\PaymentMethodIntegration\AvailabilityCheckerInterface - allows programmatically defining whether instant purchase is supported (e.g. support may not be available if some payment method option is switched on/off). The basic implementation always returns true.Magento\InstantPurchase\PaymentMethodIntegration\PaymentTokenFormatterInterface - creates a string that describes the stored payment method. The basic implementation returns the payment method name. It is highly recommended to implement your own formatter.Magento\InstantPurchase\PaymentMethodIntegration\PaymentAdditionalInformationProviderInterface - allows adding some extra values to the payment additional information array. The default implementation returns an empty array.Store / Configurations / Sales / Sales / Instant PurchaseLearn more about Instant Purchase.
This module does not introduce backward incompatible changes.
You can track backward incompatible changes in patch releases.
This module was initially developed by the Creatuity Corp. and Magento Community Engineering Team.