Sunnysideup\Ecommerce\Money\EcommercePaymentSupportedMethodsProvider
if you want to implement rules around selecting specific payment gateways for specific orders then you need to extend this class and add the following to mysite/_config/config.yml: <code yml> Injector: EcommercePaymentSupportedMethodsProvider: class: MyCustom_EcommercePaymentSupportedMethodsProvider </code>.
in PHP you will have something like this:
<code php>
class MyCustom_EcommercePaymentSupportedMethodsProvider extends EcommercePaymentSupportedMethodsProvider {
//....
}
</code>
Synopsis
class EcommercePaymentSupportedMethodsProvider
implements
EcommercePaymentSupportedMethodsProviderInterface
{
- // methods
- public void SupportedMethods()
- public static void supported_methods_basic_list()
- public static void assign_payment_gateway()
- protected void arrayReplaceKey()
- protected DataObject|Order orderToUse()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
- SilverStripe\Core\Extensible
- SilverStripe\Core\Injector\Injectable
Implements
Methods
protected
- arrayReplaceKey() — replace a payment with another one.
- orderToUse() — returns the order to use....
public
- SupportedMethods() — this method returns an associative array of payment methods available for the current order.
- assign_payment_gateway()
- supported_methods_basic_list()