-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for $response->isPending #66
Comments
We are running into something similar. If people are taking payments via Bank Transfer on mollie, these payments often take time but people want the purchase to be complete. At the moment Mollie returns As a crude example in the /**
* @return bool
*/
public function isPending()
{
// Return as pending if the purchase is a bank transfer with and `open` status.
if (!$this->isSuccessful() && $this->isOpen() && isset($this->data['method']) && 'banktransfer' === $this->data['method']) {
return true;
}
return parent::isPending();
} Unless there is something I am missing here and there is a different way of handling these types of payments? |
Why would the method specifically need to be I've since moved the Mollie payment integration off from OmniPay (because their own api is ❤️ ), but just the |
The thought behind that is because a credit card can also have a I think the likelihood is that maybe moving away from the omnipay library to avoid getting "lost" in the abstraction and dealing with the mollie API directly. |
Related to #18
My OmniPay implementation (2.5.2 / mollie 3.2.0) supports a wide range of gateways from a single integration, as OmniPay was meant to be used for.
When the customer returns to the checkout, the code looks somewhat like this:
I also ran into #18 in this situation, where the slower payment methods offered by mollie (e.g. bank transfer) would cause the customers to see a "something went seriously wrong" because the gateway threw the exception about the transactionReference not being set. In reality, the payment confirmation would come a second or two later (or a couple days later for bank transfer), so the integration is telling the customer something incorrect. I've worked around that particular issue by specifically setting the transactionReference from the stored transaction ID, but it's still not working great.
On further inspection it appears that
$response->isPending()
is not implemented, so while I can redirect the user back to their payment page ($response->isRedirect()
is still true for open transactions, at least in test mode), I can't show the payment pending page on my own page. I think that ideally a payment that is in status "open" should causeisPending()
to be true. Probably on the FetchTransactionResponse, but there might be something to say for implementing that only on the CompletePurchaseResponseThere already is an
isOpen()
method on theFetchTransactionResponse
, but as that's specific to Mollie and doesn't exist on the abstractresponse/interface, I can't quite as easily incorporate that into my general checkout logic.Basically, 2 questions:
The text was updated successfully, but these errors were encountered: