thephpleague / omnipay-manual

Manual driver for the Omnipay PHP payment processing library
MIT License
17 stars 12 forks source link

Why was purchase() removed #3

Closed delatbabel closed 8 years ago

delatbabel commented 8 years ago

Probably a historical question for @amacneil : Why was the purchase() method removed from this gateway?

amacneil commented 8 years ago

Oh, right. Well the e-commerce platform I originally wrote Omnipay for allowed the admin to specify whether they wanted a payment gateway to authorize or purchase during checkout. The manual gateway was used to record payment by check / cash etc. The flow for this is that the payment was recorded as "authorized" during the checkout flow, then when the store received cash, they would mark it as "captured". It was unwanted/unsafe to allow the manual gateway to perform purchase() during checkout, because that would mean customers could potentially mark their order as paid without actually paying any money.

All this is historical of course, and it could be overwritten/enforced by any ecommerce platform that wanted similar behavior. So if it makes sense to add purchase back to the manual gateway, then go ahead :)

delatbabel commented 8 years ago

OK I'll add it back in then. It's a no-op anyway like all of the other methods but I think it's an application decision to decide whether money has actually changed hands or not.