Skip to content

yknsilva/phpeste2024

Repository files navigation

PHPeste 2024 Presentation

Setup

Install phpctl and stack.

About

Inside adapter are the common abstractions for payment processing through different gateways.

Supported gateway names:

  • awesome: return success for all operations
  • fail: return error for all operations

Supported operations:

  • charge
  • capture
  • cancel
  • refund

Running

APIs

Use Postman collection to perform requests. Both phractico and Laravel applications' URLs are defined to http://localhost:8000/api.

phractico

cd gateway-phractico
mkdir database && touch database/database.sqlite
composer install
phpctl server 8000 public

Laravel

cd gateway-laravel
composer install
phpctl server 8000 public

CLI

CLI application uses minicli.

cd gateway-minicli
composer install
chmod +x minicli
./minicli payment gateway=<gateway_name> operation=<operation>

Messaging

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

About

My talk at PHPeste 2024

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages