Level 2
What package are you using, or are you making the package yourself?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have implement omnipay Cybersource package. Like this
$gateway = \Omnipay\Omnipay::create('Cybersource');
$gateway->initialize(array(
'profileId' => '',
'secretKey' => '',
'accessKey' => '',
'testMode' => true, // Or false when you are ready for live transactions
));
$response = $gateway->purchase(
[
'amount' => '10.00',
'currency' => 'USD',
'card' => [
'firstName' => 'test'
]
]
)->send();
if ($response->isSuccessful()) {
echo "Transaction was successful!\n";
} else if ($response->isRedirect()) {
$response->redirect();
} else {
// Payment failed
echo $response->getMessage();
}
But I didn't get the off-site page to enter the card information details while I run this code. I redirected to success page.
Please or to participate in this conversation.