Skip to content
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

PxPay supports authorize but not capture? #41

Open
hailwood opened this issue Jun 15, 2017 · 5 comments
Open

PxPay supports authorize but not capture? #41

hailwood opened this issue Jun 15, 2017 · 5 comments

Comments

@hailwood
Copy link

As the title says pxpay seems to support authorize but not capture.

@delatbabel
Copy link
Contributor

That's not uncommon unfortunately. I was just working on another gateway plugin and their gateway API doesn't support capture either. You can do an authorize but then you either have to void it or let it expire, you can't actually capture it.

If the PxPay API supports capture then I'm happy to process a PR for it.

@hailwood
Copy link
Author

Ah I've found the relevant docs in the integration guide

Please note that a complete transaction cannot be submitted via PX Pay 2.0, as the PX Pay 2.0 API is designed for the initial capture of card data only.
The Complete transactions will need to be processed manually using the Payline account (included with each PX Pay 2.0 account).

I'm not sure if I'm being a bit silly here but is it worth adding that snippet to the readme to explain what to me at least seems like a weird situation?

@delatbabel
Copy link
Contributor

I'm not sure if I'm being a bit silly here but is it worth adding that snippet to the readme to explain what to me at least seems like a weird situation?

I would document this either in the README or in the class docblock of the relevant gateway class, under a section titled QUIRKS. This is the approach I've used in the past.

@nbertram
Copy link

nbertram commented Dec 4, 2017

I think the intention is you use PxPost (or PXWS, or Payline) to capture the auth. You use getTransactionReference() to get the authorisation from completeAuthorize(), then call capture() on the PxPostGateway using that reference (assuming you're set up for PxPost and PxPay).

Similarly, voids are done through PxPost using refund().

This is documented in the PxPay documentation on page 26 (FINALIZING AUTH TRANSACTIONS -> Option 4-5: PX Pay 2.0 > PX Post/Webservice), so I wouldn't say it's a quirk...

@delatbabel
Copy link
Contributor

Well, it's quite different to what a lot of other gateways do, so that's one of the things that I normally include in the gateway documentation under "quirks", even if it is documented. I'll leave this open in case someone wants to submit a PR to tidy up the package documentation to include such a note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants