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
public
# get_hosting_subscription( )
Currently active subscription number attached to invoice
public
# get_invoice( )
Invariant invoice tied to an account
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
# is_referred( $invoice )
public
# get_payment_information( string $transnum , int $date , $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( string $fname , string $lname , string $email = '' )
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 , string $firstName , string $lastName , string $email = '' )
Create initial referral profile
public
# change_payout_preference( string $pref , mixed $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( $invoice = NULL )
Retrieve 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
public
# change_credit_card_information( $expyear , $expmonth , $cvm = NULL, $number = NULL, $type = NULL )
public
# change_billing_information( string $firstname , string $lastname , string|null $company = NULL, string $address , string $city , string $state , string $zip , string $country , string|null $phone = NULL, string|null $email = NULL )
Update billing information on account
public
# get_package_type( )
Get current package
public
# get_package_by_invoice( $invoice )
Get package name from invoice
public
# claim_referral( $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 )
Methods inherited from Module\Skeleton\Standard
__construct(), set_user_parameters(), clean_user_parameters(), set_session_id(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), get_service_names(), get_services(), get_new_services(), get_active_services(), get_config(), get_service_value(), set_config_journal(), set_config(), query(), _resetModule()
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, $pgsql, $mysql