deniztezcan / omnipay-ingenico-epayments

Ingenico ePayments driver (e-Commerce) for the Omnipay PHP payment processing library
MIT License
1 stars 2 forks source link

Custom form attributes for specific payment methods #1

Closed leroy0211 closed 5 years ago

leroy0211 commented 5 years ago

I am missing an option to add custom form attributes like ISSUERID, which is for example only available when using iDEAL.

deniztezcan commented 5 years ago

Will add this feature tomorrow.

deniztezcan commented 5 years ago
<?php
use Omnipay\Omnipay;

$gateway = Omnipay::create('IngenicoePayments');

$gateway->setMode('test');
$gateway->setPSPID('PSID');
$gateway->setLanguage('nl_NL');
$gateway->setShaIn('SHAIN');
$gateway->setShaOut('SHAOUT');

$request = $gateway->purchase([
    'amount' => 9999, 
    'currency' => 'EUR', 
    'returnUrl' => 'https://example.com/tmp/done',
    'cancelUrl' => 'https://example.com/tmp/cancel', 
    'transactionId' => '1111111', 
    'description' => 'DESCRIPTION',
    'paymentMethod' => 'PAYMENTMETHOD',
    'card'  => [
        'firstName'         => 'firstName',
        'lastName'          => 'lastName',
        'billingAddress1'   => 'billingAddress1',
        'postcode'          => 'postcode',
        'city'              => 'city',
        'phone'             => 'phone',
        'email'             => 'email'
    ],
    'customfields' => [
        'ISSUERID' => 'AAAAA',
    ]
]);
$response = $request->send();
$response->redirect();