bayarcash 1.0.0
bayarcash: ^1.0.0 copied to clipboard
Dart SDK for the Bayarcash payment gateway. A feature-parity, idiomatic port of the official PHP SDK, usable from Flutter apps and server-side Dart.
Changelog #
All notable changes to this package will be documented in this file.
1.0.0 - 2026-07-22 #
Added #
- Initial release of the Bayarcash Dart SDK — a feature-parity, idiomatic port of the official PHP SDK. Pure Dart, usable from Flutter apps and server-side Dart.
Bayarcashclient with named-parameter configuration (token,secretKey,sandbox,apiVersion,timeout) and an injectablehttp.Clientfor testing. FluentuseSandbox(),setApiVersion(),setTimeout(),setToken()setters are also provided.- API v2 (default) and v3 support, with automatic base-URI selection per version and environment.
- Checksum generation (HMAC-SHA256):
createChecksumValue,createPaymentIntentChecksumValue(plus the misspelledcreatePaymentIntenChecksumValuealias),createFpxDirectDebitEnrolmentChecksumValue, andcreateFpxDirectDebitMaintenanceChecksumValue. Byte-compatible with the gateway and the PHP SDK. - Callback verification for every callback type — pre-transaction, transaction,
return-url, Direct Debit bank approval, Direct Debit authorization (including
application_type), and Direct Debit transaction — using constant-time checksum comparison. - Operations:
createPaymentIntent,getTransaction,getPaymentIntent(v3),cancelPaymentIntent(v3),getAllTransactionsand the v3 transaction queries (getTransactionByOrderNumber,getTransactionsByPayerEmail,getTransactionsByStatus,getTransactionsByPaymentChannel,getTransactionByReferenceNumber),getPortals,getChannels,fpxBanksList, FPX Direct Debit enrol/maintain/terminate +getFpxDirectDebitgetFpxDirectDebitTransaction, and manual bank transfer create (multipart file upload) + update-status.
- Payment-channel constants (all channels, with the id-20 gap and ShopeePay at
21), status enums (
Fpx,FpxDirectDebit,Dobw) with status-text helpers, and payer-id-type / frequency-mode constants. - Typed exceptions mapping HTTP status codes:
ValidationException(422),NotFoundException(404),FailedActionException(400),RateLimitException(429), andBayarcashApiException(other), all subclassingBayarcashException. - Tolerant response resources for payment intents, transactions, portals, FPX
banks, and mandates, with typed fields,
raw/operator[]access, andtoMap().