Search code examples
omnipay

How to use Omnipay/Manual


I found omnipay/manual driver that should allow user to manually process the transaction, but don't find any instruction, tutorial etc..

So how can I use it to create, made paid, etc.. for a transaction? Both instruction and links to tutorial/documentation are good


Solution

  • The omnipay/manual driver is a very simple driver that just returns "success" for every transaction. It does not make any transactions or send any data to the gateway. Also it only has the authorize() method, not the purchase() method.

    So using it is very simple:

    $gateway = Omnipay::create('Manual');
    $response = $gateway->authorize(['amount' => 10.00])->send();
    if ($result->isSuccessful()) {
        // The result is always success
    }
    

    Note that no data is passed to any transaction processor, card company, bank, bitcoin vendor, etc. It's most commonly just used to record that a payment has happened in your own system -- the payment may be cash, cheque, etc.