First-Iraqi-Bank/fib-php-payment-sdk — reverse-engineered prompt
Reverse engineered prompt
Build me a clean PHP payment SDK for First Iraqi Bank that developers can drop into their own apps. It should let them connect with API key and secret from environment variables, create a payment, check a payment’s status, cancel a payment, issue refunds, and handle payment callbacks.
Keep it easy to install with Composer, but also make it usable manually if someone doesn’t use Composer. Include simple example files that show the full flow, setting up config, creating a payment, saving the returned payment ID and user payment link, checking status later, refunding, cancelling, and receiving callbacks.
Please add a clear README with setup steps, required env values, usage snippets, testing instructions, and basic troubleshooting. Use sensible PHP structure with services for auth and payments, load values from a .env file, and include PHPUnit tests for the main flows. Look up the current FIB payment docs online if you need to.
Want more depth? Deep Reverse