Open nepaakash opened 3 years ago
Hello bro,
I need help. How to implement the Cybersource I get a payment success redirect page.
$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();
}
Here I am not sharing my profile id. Can you share your implementation?
APi end point for live and test need to be updated. Currently its https://testsecureacceptance.cybersource.com/silent . it need to be chnaged to https://testsecureacceptance.cybersource.com