Download the PHP package ndradev/digiflazz-sdk-laravel without Composer

On this page you can find all versions of the php package ndradev/digiflazz-sdk-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package digiflazz-sdk-laravel

DigiFlazz SDK untuk Laravel

Latest Version on Packagist Total Downloads License

SDK Laravel profesional untuk DigiFlazz API - Platform PPOB (Payment Point Online Bank) terkemuka di Indonesia untuk pembelian pulsa, paket data, token listrik, dan berbagai produk digital lainnya.

Daftar Isi

Fitur

Persyaratan

Instalasi

Instal package melalui Composer:

Laravel (Auto-discovery)

Untuk Laravel 5.5 ke atas, service provider dan facade akan otomatis terdaftar melalui package auto-discovery.

Laravel (Registrasi Manual)

Untuk versi Laravel yang lebih lama, tambahkan service provider dan facade ke config/app.php:

Konfigurasi

Publish file konfigurasi:

Tambahkan kredensial DigiFlazz Anda ke file .env:

Penjelasan Konfigurasi

Konfigurasi Deskripsi Default
DIGIFLAZZ_USERNAME Username akun DigiFlazz Anda -
DIGIFLAZZ_API_KEY API Key dari dashboard DigiFlazz -
DIGIFLAZZ_PRODUCTION Mode production (true) atau development (false) false
DIGIFLAZZ_WEBHOOK_SECRET Secret untuk verifikasi webhook API Key
DIGIFLAZZ_WEBHOOK_ENABLED Aktifkan webhook handler true

Penggunaan

Menggunakan Facade

Menggunakan Dependency Injection

Metode yang Tersedia

Produk & Harga

Mendapatkan Daftar Harga

Mendapatkan Produk Berdasarkan SKU

Transaksi

Membuat Transaksi Baru

Parameter:

Parameter Tipe Wajib Deskripsi
buyer_sku_code string Ya Kode produk yang akan dibeli
customer_number string Ya Nomor tujuan (nomor HP, ID pelanggan, dll)
ref_id string Tidak ID referensi unik dari sistem Anda
extra_data string Tidak Data tambahan (opsional)

Cek Status Transaksi

Riwayat Transaksi

Parameter:

Parameter Tipe Wajib Deskripsi
start_date string Tidak Tanggal mulai (format: Y-m-d)
end_date string Tidak Tanggal akhir (format: Y-m-d)
status string Tidak Filter status (pending, success, failed)
buyer_sku_code string Tidak Filter berdasarkan kode produk
page int Tidak Halaman (default: 1)
limit int Tidak Jumlah data per halaman (default: 20)

Saldo & Akun

Cek Saldo

Cek Tagihan

Cek PLN Prabayar (Token)

Cek PLN Pascabayar

Cek PDAM

Cek BPJS

Cek Kartu Kredit

Webhook/Callback

Setup Webhook di Dashboard DigiFlazz

  1. Login ke dashboard DigiFlazz
  2. Masuk ke menu Callback/Webhook
  3. Masukkan URL endpoint webhook Anda
  4. Simpan konfigurasi

URL webhook harus dapat diakses dari internet.

Testing Webhook

Models

SDK ini menyediakan beberapa model untuk memudahkan pengolahan data:

Product Model

Transaction Model

Balance Model

TransactionRequest Model

Penanganan Error

SDK ini menyediakan beberapa exception class untuk penanganan error yang lebih baik:

Webhook Handler

Setup Route Webhook

Tambahkan route untuk webhook di routes/api.php:

Event Listener

SDK ini memancarkan event TransactionStatusChanged ketika webhook diterima. Anda bisa membuat listener:

Contoh Lengkap Webhook Handler

Testing

Jalankan test suite:

Contoh Penggunaan Lengkap

Controller untuk Pembelian Pulsa

Troubleshooting

Error: Invalid Signature

Pastikan API Key yang digunakan benar dan sesuai dengan yang ada di dashboard DigiFlazz.

Error: Connection Timeout

Periksa koneksi server Anda ke internet dan pastikan firewall tidak memblokir koneksi ke api.digiflazz.com.

Webhook Tidak Diterima

  1. Pastikan URL webhook dapat diakses dari internet (tidak localhost)
  2. Periksa SSL certificate jika menggunakan HTTPS
  3. Pastikan endpoint webhook mengembalikan response JSON dengan status 200

Saldo Tidak Cukup

Pastikan saldo DigiFlazz Anda mencukupi sebelum melakukan transaksi. Gunakan Digiflazz::getBalance() untuk cek saldo.

Kontribusi

Kami sangat menghargai kontribusi dari komunitas. Silakan buat Pull Request untuk fitur atau perbaikan bug.

Changelog

Lihat CHANGELOG untuk informasi lebih lanjut.

Keamanan

Jika Anda menemukan masalah keamanan, silakan kirim email ke [email protected].

Kredit

Lisensi

MIT License (MIT). Lihat LICENSE untuk informasi lebih lanjut.


All versions of digiflazz-sdk-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0
guzzlehttp/guzzle Version ^7.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ndradev/digiflazz-sdk-laravel contains the following files

Loading the files please wait ...