https://github.com/athlan/yetipay
PHP library for yetipay.pl
https://github.com/athlan/yetipay
payment payment-button payment-integration yetipay
Last synced: 10 months ago
JSON representation
PHP library for yetipay.pl
- Host: GitHub
- URL: https://github.com/athlan/yetipay
- Owner: athlan
- Created: 2014-09-21T11:40:37.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-09-05T18:39:45.000Z (almost 9 years ago)
- Last Synced: 2025-05-28T21:11:36.398Z (about 1 year ago)
- Topics: payment, payment-button, payment-integration, yetipay
- Language: PHP
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yetipay PHP Client library
===
This library allows to easy integration with [yetipay](https://www.yetipay.pl/) payments.
## Features
* Generated payment button
* Handles pingback (`URL_STATUS`)
* Verifies payments
## Installation
### Composer
Add dependency in `composer.json` file:
```
{
"require": {
"athlan/yetipay": "1.*"
}
}
```
## Examples
### Handle pingback (`URL_STATUS`)
```php
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);
?>
getButtonCode($button) ?>
```
### Validate payment
```php
validateTransaction($transactionId);
if($data['status'] == 200) {
// activte product here
}
```