PayboxByVerifone / Magento-2.0.x-2.2.x

Paybox by Verifone integration for Magento 2.0.x to 2.2.x
Apache License 2.0
7 stars 8 forks source link

Order confirmation email send before the payment done #10

Open spras opened 7 years ago

spras commented 7 years ago

The order confirmation email is send before the payment is done.

This is because in Paybox\Epayment\Model\Payment\AbstractPayment

public function getOrderPlaceRedirectUrl()
    {
        return $this->getUrl('pbxep/payment/redirect', array('_secure' => true));
    }

returns null

mflasquin commented 5 years ago

Do you have resolved this issue ?

pixmin commented 5 years ago

On a default Magento 2.2.5 (but I believe this is standard on all Magento 2 versions), when I choose "Check / Money order" as a payment method, I do receive an order confirmation.

The next step is to validate the payment (manually in this case, or via IPN when using Paybox). This will send an Invoice for the order. Those are two different email confirmations.

@spras Why do you believe the order confirmation should not be sent before the payment is done?

spras commented 5 years ago

Because, it seems weird to receive an order confirmation email when the payment failed. And i don't remember receiving a payment confirmation email, in case of success ?

pixmin commented 5 years ago

You should definitely receive an email confirmation (Invoice email) when:

Maybe you didn't receive the email because the IPN didn't get through?

spras commented 5 years ago

Don't remember, it was more than one year ago... i think it weird for users to receive two confirmation emails in case of success et one confirmation email in case of payment failure.

pixmin commented 5 years ago

Agreed, but that's how Magento works, nothing to do with Paybox as far as I know since ordering by check does the very same thing...