2017 © Pedro Peláez
 

library yetipay

Yetipay.pl PHP library

image

athlan/yetipay

Yetipay.pl PHP library

  • Tuesday, September 5, 2017
  • by athlan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Yetipay PHP Client library

This library allows to easy integration with yetipay payments., (*1)

Features

  • Generated payment button
  • Handles pingback (URL_STATUS)
  • Verifies payments

Installation

Composer

Add dependency in composer.json file:, (*2)

{
    "require": {
        "athlan/yetipay": "1.*"
    }
}

Examples

Handle pingback (URL_STATUS)

validateHash($params['hash'], $params)) {
    // activate product here
    
    die('ACK'); // yetipay expects "ACK" string in response to confirm transaction
}

die('FAILED');

```

### Generate payment button

```php
setUserId('userid_here');
$button->setProductId('productid_here');
$button->setReturnUrl('http://localhost/validate-transaction.php?transactionId=%transactionId%');

$buttonGenerator = new Yetipay\PaymentButtonCodeGenerator($yetipay);

?><html xmlns:yp="https://www.yetipay.pl">

<head>
  
</head>
<body>

  getButtonCode($button) ?>
</body>

</html>

Validate payment

<?php 

use Yetipay as Yetipay;

$merchantId = '';
$authKey1 = '';
$authKey2 = '';

$yetipay = new Yetipay\Client($merchantId, $authKey1, $authKey2);
$pingback = new Yetipay\TransactionValidate($yetipay);

$transactionId = $_GET['transactionId']; // or more proper way in frameworks, from Request object
$data = $pingback->validateTransaction($transactionId);

if($data['status'] == 200) {
    // activte product here
}

The Versions

05/09 2017

dev-master

9999999-dev https://github.com/athlan/yetipay

Yetipay.pl PHP library

  Sources   Download

MIT

The Requires

 

payment payments yetipay

05/09 2017

1.2.0

1.2.0.0 https://github.com/athlan/yetipay

Yetipay.pl PHP library

  Sources   Download

MIT

The Requires

 

payment payments yetipay

29/12 2016

1.1.0

1.1.0.0 https://github.com/athlan/yetipay

Yetipay.pl PHP library

  Sources   Download

MIT

The Requires

 

payment payments yetipay

22/09 2014

1.0.0

1.0.0.0 https://github.com/athlan/yetipay

Yetipay.pl PHP library

  Sources   Download

MIT

The Requires

 

payment payments yetipay