2017 © Pedro Peláez
 

library oppwa

Peach Payments OPPWA php library

image

peach/oppwa

Peach Payments OPPWA php library

  • Monday, July 11, 2016
  • by rootindex
  • Repository
  • 3 Watchers
  • 1 Stars
  • 3,871 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

Peach\Oppwa Library

Peach Payments OPPWA php library

Examples:

There is three ways to configure the client., (*1)

$config = new \Peach\Oppwa\Configuration(
    'set_your_user_id',
    'set_your_password',
    'set_your_entity_id'
);

$client = new \Peach\Oppwa\Client($config);

$client = new \Peach\Oppwa\Client([
    'set_your_user_id',
    'set_your_password',
    'set_your_entity_id']
);

```php $client = new \Peach\Oppwa\Client( 'set_your_user_id', 'set_your_password', 'set_your_entity_id' );, (*2)


If you wish to use the test server. ```php $client->setTestMode(true);

All responses will contain an isSuccess method to check if the result was successful, (*3)

if ($response->isSuccess()) {
 // was successful
}

Getting a payment status., (*4)

$paymentStatus = new \Peach\Oppwa\Payments\Status($client);
$paymentStatusResult = $paymentStatus
    ->setTransactionId('8a82944a55c5c6620155ca4667222d20')
    ->process();

var_dump(json_decode((string)$paymentStatusResult, JSON_PRETTY_PRINT));

Storing a card., (*5)

$storeCard = new \Peach\Oppwa\Cards\Store($testClient);
$storeCardResult = $storeCard->setCardBrand(\Peach\Oppwa\Cards\Brands::MASTERCARD)
    ->setCardNumber('5454545454545454')
    ->setCardHolder('Jane Jones')
    ->setCardExpiryMonth('05')
    ->setCardExpiryYear('2018')
    ->setCardCvv('123')
    ->process();

Deleting a saved card., (*6)

$cardDelete = new \Peach\Oppwa\Cards\Delete($testClient);
$cardDelete->setTransactionId($storeCardResult->getId());
$cardDeleteResult = $cardDelete->process();

Doing a full debit., (*7)

$debit = new \Peach\Oppwa\Payments\Debit($testClient);
$debitResult = $debit
    ->setCardBrand(\Peach\Oppwa\Cards\Brands::MASTERCARD)
    ->setCardNumber('5454545454545454')
    ->setCardHolder('Jane Jones')
    ->setCardExpiryMonth('05')
    ->setCardExpiryYear('2018')
    ->setCardCvv('123')
    ->setAmount(95.99)
    ->setCurrency('EUR')
    ->setAuthOnly(false)
    ->process();

Doing a pre-auth only., (*8)

$preAuthorization = new \Peach\Oppwa\Payments\Debit($testClient);
$preAuthorizationResult = $preAuthorization
    ->setCardBrand(\Peach\Oppwa\Cards\Brands::MASTERCARD)
    ->setCardNumber('5454545454545454')
    ->setCardHolder('Jane Jones')
    ->setCardExpiryMonth('05')
    ->setCardExpiryYear('2018')
    ->setCardCvv('123')
    ->setAmount(95.99)
    ->setCurrency('EUR')
    ->setAuthOnly(true)
    ->process();

Doing a capture., (*9)

$capture = new \Peach\Oppwa\Payments\Capture($testClient, $preAuthorizationResult->getId(), '95.99', 'EUR');
$captureResult = $capture->process();

Doing a reversal (please note no value or currency provided)., (*10)

$reverse = new \Peach\Oppwa\Payments\Reverse($testClient, $captureResult->getId());
$reverseResult = $reverse->process();

Doing a refund (please note I DID provide a value and currency), (*11)

$reverse = new \Peach\Oppwa\Payments\Reverse($testClient, $captureResult->getId(), '50', 'EUR');
$reverseResult = $reverse->process();

The Versions

11/07 2016

dev-master

9999999-dev

Peach Payments OPPWA php library

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Francois Raubenheimer

11/07 2016

1.0.0

1.0.0.0

Peach Payments OPPWA php library

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Francois Raubenheimer