2017 © Pedro Peláez
 

library omnipay-ifthenpay

Ifthenpay driver for the Omnipay PHP payment processing library

image

facestorept/omnipay-ifthenpay

Ifthenpay driver for the Omnipay PHP payment processing library

  • Wednesday, February 14, 2018
  • by luciano-jr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 41 % Grown

The README.md

Ifthenpay gateway for Omnipay

Multibanco, (*1)

This is the Ifthenpay gateway for omnipay payment processing library, (*2)

Build Status Latest Stable Version License, (*3)

Multibanco is one Portuguese payment method that allows the customer to pay by bank reference. This plugin will allow you to generate a payment Reference that the customer can then use to pay for his order on the ATM or Home Banking service. This plugin uses one of the several gateways/services available in Portugal, IfthenPay, and a contract with this company is required. See more at Ifthenpay., (*4)

Composer Configuration

Include the omnipay-ifthenpay package as a dependency in your composer.json:, (*5)

"ifthenpay/omnipay-ifthen": "1.*"

Installation

Run composer install to download the dependencies., (*6)

Usage

Create a MB Reference, (*7)

use Omnipay\Omnipay;

//you should use our own 50 char length key
$chaveAntiPhishing = "XXXXXX";

// Setup payment gateway
$gateway = Omnipay::create('Ifthenpay');

$gateway->setEntidade("XXXXX");
$gateway->setSubEntidade("XXX");
$gateway->setCurrency('EUR');
$gateway->setChaveAntiPhishing($chaveAntiPhishing);

$response = $gateway->purchase(['amount' => '100.99', 'transactionId' => '1'])->send();

if ($response->isSuccessful()) {
    // payment was successful: update database and store the transaction details
    $dadosMB = json_decode($response->getTransactionDetails());

    echo "Entidade: ".$dadosMB->entidade;
    echo "<br/>Referencia: ".$dadosMB->transactionReference;
    echo "<br/>Valor: ".$dadosMB->valor;
}

Callback Validation, (*8)

$response = $gateway->completePurchase(array('transactionReference' => '995 000 109','amount' => '100.99','currency' => 'EUR', 'ChaveAntiPhishingCallback' => 'XXXXXX'))->send();

if ($response->isSuccessful())
{
    //Configured AntiPhishing key matches with the received AntiPhishing key
    //This means that the payment was made
    echo "Sucesso";
}

The Versions

14/02 2018

dev-master

9999999-dev https://www.ifthenpay.com

Ifthenpay driver for the Omnipay PHP payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ifthenpay, Lda

payment pay gateway merchant omnipay ifthenpay

11/02 2016

1.0.0

1.0.0.0 https://www.ifthenpay.com

Ifthenpay driver for the Omnipay PHP payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ifthenpay, Lda

payment pay gateway merchant omnipay ifthenpay