Billing_Module

+------------------------------------------------------------+ | apnscp | +------------------------------------------------------------+ | Copyright (c) Apis Networks | +------------------------------------------------------------+ | Licensed under Artistic License 2.0 | +------------------------------------------------------------+ | Author: Matt Saladna (msaladna@apisnetworks.com) | +------------------------------------------------------------+
extends Module\Skeleton\Standard implements Opcenter\Contracts\Hookable
Methods Summary
public
# __construct( )
void __construct(void)

ignore


Overrides

public
# get_payment_method( )
Get current payment method
public
# get_next_payment( )
Next payment date and amount for the account Array fields- date: date of next payment for account. In the event the information cannot be found (reseller account for example), -1 is returned. amount: amount for next payment
public
# list_payments( )
array list_payments Sample response: Array ( [0] => Array ( [date] => 1469937612 [amount] => 65.00 [service] => Webhosting->Developer [number] => C-2ALQUJ67SSQXIDJEESZFRMZ [note] => [type] => credit ) )
public
# get_billing_status( string $invoice = '' )
Fetch billing status from backend billing server
public
# get_status( string $invoice = '' )
int get_standing_status() Fetch recurring subscription status from billing server 1 - subscription in good standing -1 - subscription cancelled, account within 90 days of expiring 0 - subscription cancelled, account outside 90 days of expiring null - cannot find subscription
public
# is_billed( )
bool is_billed()
public
# get_hosting_subscription( )
Currently active subscription number attached to invoice
public
# is_referred( string $invoice )
Account was referred by another
public
# get_payment_information( string $transnum , int $date , string $type = 'paypal' )
array get_payment_information(string) Sample response: Array ( [date] => 1469937612 [amount] => 65 [domain] => apnscp.com [service_level] => Developer [name] => Tark Sammons [email] => tark.sammons@apnscp.com [note] => [service_type] => Webhosting [method] => recurring [payment_method] => credit [reference] => C-2ALQUJ67SSQXIDJEESZFRMZ [txn_id] => 11111 [invoice] => APNSCP-CJKFHECZO35 [cc_type] => visa [cc_number] => 1111 [cc_exp] => 03/20 )
public
# edit_referral_profile( array $credentials )
Update profile information
public
# referral_profile_exists( )
Check if referral profile exists
public
# get_referral_username( )
Get referral username
public
# edit_payout_amount( float $amount )
Set minimum balance for a payout
public
# get_payout_amount( )
float get_payout_amount()
public
# get_minimum_payout_amount( )
float get_minimum_payout_amount
public
# referral_balance( )
Get current referral balance
public
# referral_multiplier( )
Get multiplier used in commission credit
public
# referral_upgrade_needed( )
Minimum requirement for next referral level array(2) { ["method"] => 254 ["client"] => 2 }
public
# get_referrals( )
Get earned commissions Sample response array(1) { [0]=> array(5) { ["domain"]=> string(8) "apnscp.com" ["accrued"]=> string(5) "30.00" ["level"]=> string(5) "Basic" ["maturity"]=> int(1172293200) ["status"]=> NULL } domain (string): accrued (float)
public
# get_customer_referral_information( )
array get_customer_referral_information()
public
# create_referral_profile( string $username , array $personal = array ( ) )
Create initial referral profile
public
# change_payout_preference( string $pref , string $val )
Change referral payout options
public
# get_payout_preference( string $pref )
Fetch payout option
public
# add_referral( string $invoice , string $pinvoice )
Record a new referral
public
# get_credit_from_invoice( string $invoice )
Get referral credit by invoice
public
# get_credit_from_package_type( string $package )
Get referral credit by package type
public
# get_invoice_from_domain( string $domain )
Get hosting invoice by domain
public
# get_renewal_hash( string $invoice = NULL )
Retrieve latest billing renewal hash for service
public
# get_customer_since( )
Get customer since
public
# get_billing_information( )
Get billing information attached to account Array ( [first_name] => Tark [last_name] => Sammons [city] => Atlanta [state] => Georgia [zip_code] => 30308 [country] => US [company] => [address] => 123 Anywhere St [phone] => 867-5309 [email] => tark.sammons@apnscp.com )
public
# get_credit_card_information( )
Get billing details
public
# change_credit_card_information( int $expyear , int $expmonth , string $cvm = NULL, string $number = NULL, string $type = NULL )
Update billing details
public
# change_billing_information( array $details )
Update billing information on account
public
# get_package_type( )
Get current package
public
# get_package_by_invoice( string $invoice )
Get package name from invoice
public
# claim_referral( string $token )
Claim referral from token
public
# claim_metadata( string $token )
Get data about a referral Sample return: Array( [domain] => apnscp.com [revenue] => 20.00 [maturity] => 1469937612 )
public
# configured( )
Used by TemplateEngine to confirm module is setup
public
# _verify_conf( Opcenter\Service\ConfigurationContext $ctx )
public
public
public
public
public
public
# _edit_user( string $userold , string $usernew , array $oldpwd )
public
# get_invoice( )
Invariant invoice tied to an account
Methods inherited from Module\Skeleton\Standard
__construct(), setUserParameters(), autoloadModule(), __wakeup(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), cleanUserParameters(), query()
Constants inherited from Module\Skeleton\Standard
DEPENDENCY_MAP
Properties inherited from Module\Skeleton\Standard
$exportedFunctions, $username, $password, $domain, $user_id, $group_id, $permission_level, $session_id, $site, $site_id