Sylius/PayPalPlugin

"You cannot onboard more than one PayPal seller!" error when creating any payment method after sylius.pay_pal

Closed this issue ยท 5 comments

tifed commented

PayPalPaymentMethodListener always returns error if sylius.pay_pay already connected.
This condition always returns true and no matter what factory you want to use

Hello @tifed! Yes, this is the simplification we decided to take due to some possible issues that having multiple PayPal payment methods in the application can lead to (see #115 and #147 for reference).

For sure we would like to implement support for multiple PayPal payment methods (probably one per channel is a fair compromise), but we need to take care of the proper implementation, as it's definitely not trivial. In the meantime, you can try to override this service and provide your own logic. It would be definitely easier to handle it for the specific need than in a generic way how we must do it ๐Ÿ–– ๐Ÿš€

tifed commented

@Zales0123 No no no... That error triggered even if you select ANY different payment method (offline - for example).

In other words it sounds like "You can`t add offline method coz you have paypal".
That condition must look like

if ($paymentMethod->getGatewayConfig()->getFactoryName() === 'sylius.pay_pal' 
    && $this->isTherePayPalPaymentMethod()) {
    ...
}

๐Ÿ˜ฑ ok, you're right ๐Ÿ˜„ it's weird we didn't notice it before ๐Ÿ’ƒ

Would you like to open a PR with such a fix? It would be great ๐ŸŽ‰ Thanks in advance!

Should be fixed with #172 ๐ŸŽ‰

bellu commented

I'm trying to add two different payPal gateway, on two different channels; but it seems that this is still not allowed.