How to integrate a Payment Gateway as a Plugin?
Step 1: Generic Configuration
namespace Acme\SyliusExamplePlugin\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
final class GatewayConfigurationType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('api_key', TextType::class);
}
}

Step 2: Command Provider & Handler
Creating a Gateway Command Provider
Creating an action Command Provider
Defining the Capture Command
Creating the Capture Command Handler
Important Tips
Step 3: Handling Payment via the UI and API
Create an Actions HTTP Response Provider
Create an HTTP Response Provider
Register the Response Provider
Handling Other Payment Actions
Using Payment Request for UI
Last updated
Was this helpful?
