matok/pay-by-square-svk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

matok/pay-by-square-svk

最新稳定版本:1.0

Composer 安装命令:

composer require matok/pay-by-square-svk

包简介

Payment QR Code generator for Slovak banks.

README 文档

README

Overview

This PHP library hanle generation of QR Code Payment.

Installation

You can install the library using Composer:

composer require matok/pay-by-square-svk

Requirements

You need https://en.wikipedia.org/wiki/XZ_Utils in order to generate pyament QR Code. To set this dependecy you have to pass path to this application in constructor.

use Matok\PayBySquare\PaymentGenerator\Generator;
...
$generator = new Generator('/usr/bin/xz');

How to use

use Matok\PayBySquare\Value\DueDate;
use Matok\PayBySquare\Value\Iban;
use Matok\PayBySquare\Value\PriceEur;
use Matok\PayBySquare\Value\Message;
...

$iban = new Iban('SK39 8360 5207 0042 0320 8125');
$price = new PriceEur('2.50');
$variableSymbol = VariableSymbol(123);
$message = new Message('my payment message');

$payment = $generator->generatePayment(
    $iban,
    $price,
    $variableSymbol,
    $message,
    DueDate::today()
);

You have several possibilities how to display QR Code:

// inline:
echo '<img src="' . $payment->toQrCode()->toPngInline(); .'" alt="qr code">';
// generate in controller:
header('Content-Type: image/png');
echo $payment->toQrCode()->toPng();
// you can generate QR Code by any library using payment string
showQrCode($payment->toString());

License

This library is released under the MIT License.

统计信息

  • 总下载量: 137
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-13