I feel like I've read quite a few threads of people wanting help with adding a gateway, but I haven't seemed to find any solution that's been shared once the asker figured out the answer. I know there have been suggestions to look at the Payum Bundle docs too, but since I can't figure out how exactly Sylius is integrating with the Payum Bundle, I'm not able to receive much help from the payum docs. Would someone be able to help explain what is necessary to get PayPal Pro to work in the sylius app?
I've added this to the config file:
payum:
contexts:
paypal_pro:
omnipay:
type: PayPal_Pro
options:
username: %paypal.username%
password: %paypal.password%
signature: %paypal.signature%
testMode: %paypal.test_mode%
storages:
Sylius\Component\Core\Model\Order:
doctrine:
driver: orm
Sylius\Component\Core\Model\Payment:
doctrine:
driver: orm
and this in my services.yml file:
sylius.payum.paypal.action.capture_payment_using_credit_card:
class: %sylius.payum.paypal.action.capture_payment_using_credit_card.class%
tags:
- { name: payum.action, factory: omnipay }
For the CapturePaymentUsingCreditCardAction class, I just copied over Sylius's Stripe one. I thought this would be enough since Stripe was said to work out of the box as well. When I input the fake credit card information (we're in sandbox mode), I just get an "Unknown payment error" flash message after I'm redirected to the payment method selection page. From what I understand from reading this thread, the states are automatically managed by the state machine. I had added a PaymentStatusAction briefly (copied over from the Dummy class and var_dumping what the details held), but that didn't do anything to help.
Also, would someone be able to explain the need for ExecuteSameRequestWithDetailsAction? It looks almost the same as something like CapturePaymentUsingCreditCardAction.