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, Quote
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(); } Quote
tdphong Posted October 15, 2015 Author Report Posted October 15, 2015 Thanks Tyson, I get do it, that great! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.