-
Notifications
You must be signed in to change notification settings - Fork 79
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
Added new payment request for deferred payments #42
Conversation
@judgej can you review this PR? |
Quick question: is a deferred purchase request any different to an authorise request? If not, then the The This is a serious question, because I realise there are two different ways of deferring payment in Sage Pay, each involving different ways of collecting (e.g. one must be collected in full just once, and the other can be an open authorisation that can have multiple amounts up to a limit be collected over a longer period of time). TBH, I'm not fully up to speed on those features, which can be hard to follow through the docs. |
Okay, looked the docs and the code. At the moment, this gateway driver implements A bit of background on the payment types that Sage Pay supports:
Use PAYMENT and DEFERRED in most instances (both supported by OmniPay). Use AUTHENTICATE+AUTHORISE if the final amount is not fully known up front, or authorisation or release cannot normally be done within a reasonable time (6 days usually, or 30 days absolute max). |
Conclusion: OmniPay already supports DEFERRED payments, and this PR is not needed. But please kick me if I've misunderstood the whole thing. |
Thanks for looking into this and doing alot of reading/research. The reason I created this, is that when using the Using the existing |
In order words, don't use |
$gateway = OmniPay::create('SagePay\Server');
...
// Use "authorize" here and not "purchase"
$requestMessage = $gateway->authorize([...]);
$responseMessage = $requestMessage->send(); Then later: $gateway = OmniPay::create('SagePay\Server');
...
$requestMessage = $gateway->capture([...]);
$responseMessage = $requestMessage->send(); |
I see, feel free to close this PR as is no longer needed. |
Will do, thanks. Let us know how it goes, switching over from your branch. |
It is currently not possible to create a new Sage pay transaction of any type other then PAYMENT when using server integration, this adds the functionality for DEFERRED payments.