You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$gateway = \Omnipay\Omnipay::create('Sisow');
$gateway->initialize(array(
'shopId' => '',
'merchantId' => '0123456',
'merchantKey' => 'b36d8259346eaddb3c03236b37ad3a1d7a67cec6',
'testMode' => true,
));
// Start the purchaseif(!isset($_GET['trxid'])){
$url = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$response = $gateway->purchase(array(
'amount' => "6.84",
'description' => "Testorder #1234",
'issuer' => 99, // Get the id from the issuers list, 99 = test issuer//'paymentMethod' => 'overboeking', // For 'overboeking', extra parameters are required:'card' => array(
'email' => 'barry@fruitcakestudio.nl',
'firstName' => 'Barry',
'lastName' => 'vd. Heuvel',
'company' => 'Fruitcake Studio',
),
'transactionId' => 1234,
'returnUrl' => $url,
'notifyUrl' => $url,
))->send();
if ($response->isRedirect()) {
// redirect to offsite payment gateway$response->redirect();
} elseif ($response->isPending()) {
// Process started (for example, 'overboeking')return"Pending, Reference: ". $response->getTransactionReference();
} else {
// payment failed: display message to customerreturn"Error " .$response->getCode() . ': ' . $response->getMessage();
}
}else{
// Check the status$response = $gateway->completePurchase()->send();
if($response->isSuccessful()){
$reference = $response->getTransactionReference(); // TODO; Check the reference/id with your databasereturn"Transaction '" . $response->getTransactionId() . "' succeeded!";
}else{
return"Error " .$response->getCode() . ': ' . $response->getMessage();
}
}
Note, transactionReference is only available in the PurchaseResponse when an issuer is set. Use the fetchIssuers response to see the available issuers, or use the Javascript script to fill the issuers
The billing/shipping data are set with the card parameter, with an array or CreditCard object.
Other parameters that can be entered with 'overboeking' are:
including (true/false to include a link to pay with ideal
days (number of days before a reminder is sent)
Support
If you are having general issues with Omnipay, we suggest posting on
Stack Overflow. Be sure to add the
omnipay tag so it can be easily found.
If you want to keep up to date with release anouncements, discuss ideas for the project,
or ask more detailed questions, there is also a mailing list which
you can subscribe to.
If you believe you have found a bug, please report it using the GitHub issue tracker,
or better yet, fork the library and submit a pull request.