thephpleague / omnipay-sagepay

Sage Pay driver for the Omnipay PHP payment processing library
MIT License
54 stars 78 forks source link

PAYMENT TxType on Server integration? #148

Closed thatwill closed 4 years ago

thatwill commented 4 years ago

The readme states the following in the Server integration section:

If `useAuthenticate` is set, then the `authorize` will use the `AUTHENTICATE`/`AUTHORISE`
method of reserving the transaction details.
If `useAuthenticate` is not set (the default) then the `DEFERRED`/`RELEASE`
method of reserving the transaction details will be used.

Seemingly this doesn't allow for a regular PAYMENT txtype - why is this the case? SagePay allows it. I cannot find an explanation for this, or a way to set the txtype manually.

Am I missing something obvious?

judgej commented 4 years ago

It just refers to variations on the authorize() method. If you want to make a payment, then use the purchase() method:

$response = $gateway->purchase([...])->send();
thatwill commented 4 years ago

Ah, gotcha. Thanks.

judgej commented 4 years ago

Most gateways just have single authorize() and a purchase() equivalent. Sagepay just happens to have two different modes of authorize(), and you may need to use one or the other, depending on how the payment is finally going to be captured. Hopefully the default authorize() options will be what most people need.