2017 © Pedro Peláez
 

library omnipay-wirecard

Wirecard gateway for Omnipay payment processing library

image

misato-tremor/omnipay-wirecard

Wirecard gateway for Omnipay payment processing library

  • Wednesday, July 26, 2017
  • by MisatoTremor
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Omnipay gateway implementation for the Wirecard Payment Processing API, (*1)

Usage

Creditcard enrollment check

$gateway = Omnipay::create('Wirecard');
$gateway->setUsername($apiUsername);
$gateway->setPassword($apiPassword);
$gateway->setEndpoint('https://api%s.wirecard.com/engine/rest/payments/');
$gateway->setTestMode(true);
$data = [
    'merchantAccountId' => $maid,
    'amount' => number_format($total, 2, '.', ''),
    'currency' => 'EUR',
    'card' => [
        'firstName' => $firstName,
        'lastName' => $lastName,
        'number' => $cardNumber,
        'cvv' => $cardCvv,
        'expiryMonth' => $cardMonth,
        'expiryYear' => $cardYear,
    ],
    'returnUrl' => '/wirecard/creditcard', // Your API endpoint for processing after 3-D-Secure
];
$response = $gateway->enrollmentCheck($data)->send();
if ($response->isSuccessful() && $response->isRedirect()) {
    $response->redirect(); // Redirect to 3-D-Secure processing, this will redirect to your endpoint upon completion
} elseif ($response->isLiabilityShiftGranted()) {
    $data = [
        'merchantAccountId' => $maid,
        'transactionReference' => $response->getTransactionReference(),
    ];
    $response = $gateway->purchase($data)->send();
    if ($response->isSuccessful()) {
        // Complete order
    }
}

Creditcard 3-D-Secure check (/wirecard/creditcard)

$gateway = Omnipay::create('Wirecard');
$gateway->setUsername($apiUsername);
$gateway->setPassword($apiPassword);
$gateway->setEndpoint('https://api%s.wirecard.com/engine/rest/payments/');
$gateway->setTestMode(true);
$data = [
    'merchantAccountId' => $maid,
    'transactionReference' => $_POST['MD'],
    'paRes' => $_POST['PaRes'],
];
$response = $gateway->checkPayerResponse($data)->send();
if ($response->isSuccessful()) {
    $responseData = $response->getData();
    $data = [
        'merchantAccountId' => $maid,
        'transactionReference' => $responseData->transactionId,
        'paRes' => $responseData->threeD->pares,
        'eci' => $responseData->threeD->eci,
        'xid' => $responseData->threeD->xid,
        'cardholderAuthenticationValue' => $responseData->threeD->cardholderAuthenticationValue,
    ];
    $response = $gateway->purchase($data)->send();
    if ($response->isSuccessful()) {
        // Complete order
    }
}

The Versions

26/07 2017

dev-master

9999999-dev https://github.com/MisatoTremor/omnipay-wirecard

Wirecard gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steffen Roßkamp

payment pay gateway wirecard merchant purchase omnipay

26/07 2017

0.2.0

0.2.0.0 https://github.com/MisatoTremor/omnipay-wirecard

Wirecard gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steffen Roßkamp

payment pay gateway wirecard merchant purchase omnipay

25/07 2017

0.1.1

0.1.1.0 https://github.com/MisatoTremor/omnipay-wirecard

Wirecard gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steffen Roßkamp

payment pay gateway wirecard merchant purchase omnipay

25/07 2017

0.1.0

0.1.0.0 https://github.com/MisatoTremor/omnipay-wirecard

Wirecard gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Steffen Roßkamp

payment pay gateway wirecard merchant purchase omnipay