pashazahari/billplz-bundle
最新稳定版本:0.1
Composer 安装命令:
composer require pashazahari/billplz-bundle
包简介
Integrate Billplz to your Symfony applications
README 文档
README
This is a billplz payment gateway wrapper for Symfony application.
Installation
composer require pashazahari/billplz-bundle
Requirement
- PHP 8.0+
- Symfony 8.0+
Configuration
# .env
BILLPLZ_API_KEY=
BILLPLZ_SIGNATURE_KEY=
BILLPLZ_SANDBOX=
BILLPLZ_SANDBOX_API_KEY=
BILLPLZ_SANDBOX_SIGNATURE_KEY=
# /config/packages/fd_billplz.yaml fd_billplz: enable_sandbox: "%env(bool:BILLPLZ_SANDBOX)%" # true or false sandbox: api_key: "%env(BILLPLZ_SANDBOX_API_KEY)%" signature_key: "%env(BILLPLZ_SANDBOX_SIGNATURE_KEY)%" collection: # add your bill collection here - { name: "", id: ""} # will use when create new bill live: api_key: "%env(BILLPLZ_API_KEY)%" signature_key: "%env(BILLPLZ_SIGNATURE_KEY)%" collection: - { name: "", id: ""}
Usage
/** * Note: if you have set 'enable_sandbox' to true, billplz will use 'sandbox' configuration only. */ function createPayment(BillplzInterface $billplz) { /** * Assume you have set { name: "product", id: "ae12345"} in collection. * * It will get the id from the given name, you don't have to do anything. */ $response = $billplz->createBill("product", "lorem@ipsum.com", null, "Lorem Ipsum", 100, "https://127.0.0.1/payment/success", "A new product", []); // your own logic here... }
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-15