Integrating the PayPal payment method for Computop
Edit on GitHub
You are browsing a previous version of the document. The latest version is 202212.0.
Example State Machine
Front-End Integration
To adjust frontend appearance, provide following templates in your theme directory:
src/<project_name>/Yves/Computop/Theme/<custom_theme_name>/paypal.twig
State Machine Integration
The Computop provides a demo state machine for PayPal payment method which implements Authorization/Capture flow.
To enable the demo state machine, extend the configuration with the following values:
ComputopConfig::PAYMENT_METHOD_PAY_PAL => 'ComputopPayPal',
];
$config[OmsConstants::ACTIVE_PROCESSES] = [
...
'ComputopPayPal',
];
PayPal Payment Flow:
1.There is a radio button on “Payment” step. After submit order customer will be redirected to the to Computop (Paygate form implementation). The GET consists of 3 parameters:
- data (encrypted parameters, e.g. currency, amount, description);
- length (length of
data
parameter); - merchant id (assigned by Computop);
- By default, on success the customer will be redirected to “Success” step. The response contains
payId
. On error, the customer will be redirected to “Payment” step with the error message by default. Response data is stored in the DB. - Authorization is added right after success init action by default. Capture/Refund and Cancel actions are implemented in the admin panel (on manage order). On requests, Spryker will use
payId
parameter stored in the DB to identify a payment.
Thank you!
For submitting the form