loveycom/cashfree
Laravel package for CashFree (India) integrating Marketplace Settlement and Payment Gateway APIs. Includes config publishing, environment switching (test/prod), and helper classes like Marketplace (e.g., checkBalance) to simplify CashFree API calls in Laravel.
Pros:
CashFreeServiceProvider and publishing config/cashfree.php follows Laravel’s conventions.notifyUrl in payment flows, critical for real-time event handling (e.g., payment success/failure). Integrates with CashFree’s webhook system out-of-the-box.Cons:
Order::create() enforce CashFree’s payload structure, limiting flexibility for custom fields or non-standard use cases. Overrides may require extending the package or modifying requests manually.customerPhone validation for Indian numbers). Non-Indian use cases (e.g., international vendors) may require workarounds.Stack Fit:
config/cashfree.php) integrates seamlessly with Laravel’s config management.Migration Path:
testURL and isLive = false to validate core flows (e.g., order creation, refunds) before going live.notifyUrl events (e.g., POST /cashfree/webhook).Vendor::create(), withdraw()) in a non-critical environment.Compatibility:
guzzlehttp/guzzle:^6.0).nesbot/carbon).orders table with cashfree_order_id foreign key).422 Unprocessable Entity) translated into Laravel exceptions?notifyUrl endpoints?/v1 to /v2 endpoints)?LoveyCom\CashFree\CashFreeServiceProvider in config/app.php.config/cashfree.php for appID, secretKey, and environment (testURL/prodURL).PaymentGateway\Order, Marketplace\Vendor) directly or bind them to Laravel’s container for DI.orders (linking your order_id to CashFree’s orderId).vendors (storing vendor details fetched via Vendor::retrieve()).webhook_events (tracking notifyUrl payloads).Schema::create('orders', function (Blueprint $table) {
$table->id();
$table->string('cashfree_order_id')->unique();
$table->string('status'); // e.g., "PENDING", "SUCCESS"
$table->json('metadata');
$table->timestamps();
});
notifyUrl events:
Route::post('/cashfree/webhook', [CashFreeWebhookController::class, 'handle']);
public function handle(Request $request) {
$payload = $request->all();
// Validate CashFree signature (e.g., using `CashFree::verifyWebhook($payload)` if supported)
// Update order status in DB, trigger jobs, etc.
}
appID/secretKey.Order::create() and Order::getStatus() for core transactions.notifyUrl events.Vendor::create() and withdraw() for vendor payouts.getLedger().Refund::create()) and settlements (Settlement::getAll()).Http::post() vs. Guzzle).nesbot/carbon version).order_id between systems).| Priority | Task | Dependencies | **
How can I help you explore Laravel packages today?