Difference between revisions of "Freeside:4:Documentation:Developer/FS/cust main/Billing ThirdParty"

From Freeside
Jump to: navigation, search
(Edit via perl MediaWiki framework (1.13))
 
(No difference)

Latest revision as of 07:34, 18 November 2015

METHODS

create_payment OPTIONS
Create a pending payment for a third-party gateway. OPTIONS must include: - method: a Business::OnlineThirdPartyPayment method argument. Currently only supports PAYPAL. - amount: a decimal amount. Unlike in Billing_Realtime, there is NO default. - session_id: the customer's self-service session ID.
and may optionally include: - invnum: the invoice that this payment will apply to - pkgnum: the package balance that this payment will apply to. - description: the transaction description for the gateway. - payip: the IP address the payment is initiated from
On failure, returns a simple string error message. On success, returns a hashref of 'url' => the URL to redirect the user to to complete payment, and optionally 'post_params' => a hashref of name/value pairs to be POSTed to that URL.
execute_payment SESSION_ID, PARAMS
Complete the payment and get the status. Triggered from the return_url handler; PARAMS are all of the CGI parameters we received in the redirect. On failure, returns an error message. On success, returns a hashref of 'paynum', 'paid', 'order_number', and 'auth'.
cancel_payment SESSION_ID
Cancel a pending payment attempt. This just cleans up the cust_pay_pending record.