How do I use omnipay to check if it's a pending payment or not

Viewed 1283

I'm using Omnipay 2.1 and CodeIgniter 2.1.4 to receive Paypal payments.

I use this line to complete the purchase and check if the payment was sent:

$bool = $gateway->completePurchase(array('amount' => $total, 'currency' => 'EUR'))
                ->send()
                ->isSuccessful();

But I noticed that the method isSuccessful() will also return true if the payment is on pending.

How can I use omnipay to check if it's a pending payment or not?

3 Answers
Related