tdphong Posted October 14, 2015 Report Posted October 14, 2015 Currently, i develop a plugin in plugins folder. Now, i want to call values of gateway(non-merchant) in component to this plugin. So, how can i do that? Thanks,
Tyson Posted October 14, 2015 Report Posted October 14, 2015 If you want to invoke a payment/refund on a gateway via your plugin, I suppose you could use the Payments model to do so. You could also load and instantiate the gateway yourself: Loader::loadComponents($this array("Gateways")); // Load the gateway by its name (my_gateway) and type (non-merchant) try { $gateway = $this->Gateways->create('my_gateway', 'nonmerchant'); // Do something $gateway->method(); } catch (Exception $e) { echo $e->getMessage(); }
tdphong Posted October 15, 2015 Author Report Posted October 15, 2015 Thanks Tyson, I get do it, that great!
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now