fd6130 / billplz-bundle
Integrate Billplz to your Symfony applications
Installs: 340
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.4
- jomweb/billplz: ^4.1
- symfony/config: ^4.4 || ^5.0 || ^6.0
- symfony/framework-bundle: ^4.4 || ^5.0 || ^6.0
- symfony/http-client: ^4.4 || ^5.0 || ^6.0
- symfony/http-foundation: ^4.4 || ^5.0 || ^6.0
- symfony/http-kernel: ^4.4 || ^5.0 || ^6.0
- symfony/yaml: ^4.4 || ^5.0 || ^6.0
This package is auto-updated.
Last update: 2025-03-01 00:29:07 UTC
README
This is a billplz payment gateway wrapper for Symfony application.
Installation
composer require fd6130/billplz-bundle
Requirement
- PHP 7.4+
- Symfony 4.4+
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... }