Jump to content

How To Call Value From Gateway In Component To A Plugin


Recommended Posts

Posted

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();
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...