Liking cljdoc? Tell your friends :D
Clojure only.

ventas.payment-method

The API for registering payment methods. Payment methods are responsible for:

  • Transforming an :order entity into the shape they need
  • Making the HTTP requests they need and handling them correctly
  • Updating the :order with the resulting :payment-reference and :payment-amount
  • Changing the status of the :order from :draft to :paid or :unpaid If an error occurs, it should be registered in the event log, and the order should be left unmodified.

To allow the payment methods to do their work, they can do anything they need, but most likely they'll want to:

  • Register Ring handlers: use ventas.plugin's :http-handler
  • Make HTTP requests: clj-http is included as a dependency
The API for registering payment methods.
Payment methods are responsible for:
  - Transforming an :order entity into the shape they need
  - Making the HTTP requests they need and handling them correctly
  - Updating the :order with the resulting :payment-reference and :payment-amount
  - Changing the status of the :order from :draft to :paid or :unpaid
If an error occurs, it should be registered in the event log, and the order should be
left unmodified.

To allow the payment methods to do their work, they can do anything they need, but most likely
they'll want to:
  - Register Ring handlers: use ventas.plugin's :http-handler
  - Make HTTP requests: `clj-http` is included as a dependency
raw docstring

allclj

(all)
source

pay!clj

(pay! order params)

Launches a payment method for an order

Launches a payment method for an order
sourceraw docstring

register!clj

(register! kw attrs)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close