BitBagCommerce / SyliusMercanetBnpParibasPlugin

BnpParibas Mercanet payment gateway for Sylius based applications.
MIT License
15 stars 15 forks source link

Error when cancelling a payment #10

Open PNPIT opened 5 years ago

PNPIT commented 5 years ago

Hi, I'm using SyliusMercanetBnpParibasPlugin 2.2.2 with Sylius 1.4.7. When making an order, if I cancel my payment on Mercanet site, I get the following error when going back to sylius.

Unknown method getAuthorisationId

The error seems come from bitbag/mercanet-bnp-paribas-plugin/src/Action/CaptureAction.php, at line 93.

$model['authorisationId'] = $this->mercanetBnpParibasBridge->getAuthorisationId();

To remove the error, I have to replace this line with the following:

if ($model['status'] == PaymentInterface::STATE_COMPLETED) {
    $model['authorisationId'] = $this->mercanetBnpParibasBridge->getAuthorisationId();
}

In sylius back-office, cancelled and validated orders seem to be correctly saved.

Can you reproduce the bug? Is it a valid fix? Thanks for your time.

AizeLeOuf commented 4 years ago

Same here any news ?

Loocos commented 4 years ago

Also in 1.7

felixgilles commented 3 years ago

Also in 1.10