Forum OpenACS Development: Response to ecommerce manual payment gateway

Collapse
Posted by Bart Teeuwisse on
William,

you will have to write an implementation for the Payment Service Contract and then tell the eCommerce package to use your implementation. E.g. create manual-gateway and set the eCommerce PaymentGateway parameter to manual-gateway.

All financial transactions in the eCommerce package are passed on to the chosen implementation of the Payment Service Contract. The call to  acs_sc_binding_exists_p checks to make sure that the specified implementation does exists.

See the Payment Service Contract (payment-gateway) for the definition of the Payment Service Interface. The Authorize.net implementation (authorize-gateway) is a good package to look into for an example of creating a real life Payment Service Contract implementation. And last but not least see the sample gateway (sample-gateway) for an empty shell of an implementation. This package would be a good start for your own manual gateway.

There is no need to muck with the eCommerce code. Just write a manual gateway that authorizes each call to the Authorize operation. Calls to ChargeCard should also return success so that orders can be schipped by the eCommerce administrator. The Void and Return operations come into play in the eCommerce admin section when voiding items/orders or handling customer returns.

The Payment Service Contract is by no means a code hack. Belief it or not it makes life easier rather than more complicated. Should you have more questions then post them here.

/Bart