Builds the payment provider registration for an app, so the app can take payments for shopping cart checkouts. Obtained from paymentProviderDetails on the controller mappings. Set at least the process function, then call build to install the registration on the app. Building without a process function logs a warning and produces a registration that cannot take payments.

Group: Builders


Methods

processFn(String s)

Returns: PaymentProviderDetailsBuilder

Sets the name of the function called to take a single one off payment. This is the minimum a payment provider must supply.

ParameterDescription
sname of the global JavaScript function that takes the payment

recurring(String initFn, String makeTokenPaymentFn)

Returns: PaymentProviderDetailsBuilder

Sets the two functions needed to support recurring payments, which is what lets the provider be used for subscriptions.

ParameterDescription
initFnname of the function called after the first payment, which should set up the recurring transaction
makeTokenPaymentFnname of the function called on each subsequent timed payment

paymentForm(String s)

Returns: PaymentProviderDetailsBuilder

Sets the repository path of the template that renders this provider's payment form at checkout.

ParameterDescription
stemplate path for the payment form

addPaymentOptions(String id, String title, String logoHref)

Returns: PaymentProviderDetailsBuilder

Adds a branded payment option shown to the purchaser at checkout, such as a particular card scheme or wallet.

ParameterDescription
ididentifier of the option, passed back to the payment functions
titlelabel shown for the option at checkout
logoHrefURL of the logo image shown beside the option

build()

Returns: void

Installs the configured payment provider registration on this app, replacing any previous one. Logs a warning if no process function was set, because the provider would then be unable to take payments.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.