Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I didn't get card information input form. #31

Open
shankhadevpadam opened this issue May 3, 2022 · 1 comment
Open

I didn't get card information input form. #31

shankhadevpadam opened this issue May 3, 2022 · 1 comment

Comments

@shankhadevpadam
Copy link

shankhadevpadam commented May 3, 2022

I can't get the card information form.

$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();
}
@eileenmcnaughton
Copy link
Contributor

The omnipay library handles the submitted data - but you need to set up a form to gather it - it's not that easy with Cybersouce sadly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants