Inside adapter are the common abstractions for payment processing through different gateways.
Supported gateway names:
awesome
: return success for all operationsfail
: return error for all operations
Supported operations:
charge
capture
cancel
refund
Use Postman collection to perform requests.
Both phractico and Laravel applications' URLs are defined to http://localhost:8000/api
.
cd gateway-phractico
mkdir database && touch database/database.sqlite
composer install
phpctl server 8000 public
cd gateway-laravel
composer install
phpctl server 8000 public
CLI application uses minicli.
cd gateway-minicli
composer install
chmod +x minicli
./minicli payment gateway=<gateway_name> operation=<operation>
Messaging application uses php-amqplib.
Start RabbitMQ container:
stack rabbitmq
Install dependencies:
cd gateway-messaging
composer install
Publishing messages:
php publisher.php gateway=<gateway_name> operation=<operation>
Consuming messages:
cd gateway-messaging
php consumer.php