Example 2: Full Options
Complete example using all available Modal options.
About this example
This example demonstrates all available options including callbacks, logo, and button customization.
Payment Button
Configuration
- Amount: 15 000 XOF
- Country: BF
- Show Countries: Yes
- Notify URL: https://your-site.com/webhook/afribapay
Code Example
$request = new AfribaPayRequest();
$request->amount = 15000;
$request->currency = "XOF";
$request->country = "BF";
$request->order_id = "ORDER-" . time();
$request->reference_id = "REF-" . uniqid();
// Callback URLs
$request->notify_url = "https://your-site.com/webhook/afribapay";
$request->showCountries = true;
$buttonHtml = $modal->createCheckoutButton(
$request,
"Pay Now",
"#007bff",
"large"
);