Pay
Pay PHP Methods
static checkAlreadyPurchased(\WMT\Container $container, \WMT\SQL\Billing\Billing $billing, \WMT\SQL\Visit\Visitor $visitor) v5
Checks if a visitor already purchased a product
PARAMETERS:
$container = object
$billing = object
$visitor = object
RETURN VALUE:
voidstatic checkIsAdmin(\WMT\SQL\Visit\Visitor $visitor, \WMT\Container $container) v5
Checks if the current visitor is admin. If the visitor is admin it will redirect to another page and throw error to error log
PARAMETERS:
$visitor = object
$container = object
RETURN VALUE:
voidstatic checkNextBillDate(int $nextBillDate, \WMT\Container $container, \WMT\SQL\Billing\Billing $billing, \WMT\SQL\Visit\Visitor $visitor) v5
Checks if next billing date is due
PARAMETERS:
$nextBillDate = int, Next billing date/time as timestamp
$container = object
$billing = object
$visitor = object
RETURN VALUE:
voidstatic checkPayCreditCardRedirect(\WMT\SQL\Billing\BillingAgreementPayment $billingAgreementPayment, bool $hasShown, int $count, string $buttonCont) v5
Checks if a member has a saved credit card and redirect to pay using it.
PARAMETERS:
$billingAgreementPayment = object
$hasShown = bool, True to show the saved cards, false otherwise
$count = int, Number of saved cards
$buttonCont = string, Pay using the credit card button HTML
RETURN VALUE:
voidstatic checkVisitorOwnsAgreement(\WMT\MySQL $mysqli, \WMT\SQL\Billing\BillingAgreement $billingAgreement, \WMT\SQL\Visit\Visitor $visitor) v5
Checks if visitors owns a billing agreement. Will throw an error if the billing agreement doesn't belong to the visitor
PARAMETERS:
$mysqli = object
$billingAgreement = object
$visitor = object
RETURN VALUE:
voidstatic getAwaitingApprovalHTML(\WMT\MySQL $mysqli, \WMT\SQL\Billing\BillingAgreementPayment $billingAgreementPayment, \WMT\SQL\Billing\BillingAgreement $billingAgreement, string $awaitingApprovalHTML, string $alreadyPaidHTML, bool $showMultiple = false) v5
Gets manual payment status as HTML (Awaiting approval | Already paid etc).
PARAMETERS:
$mysqli = object
$billingAgreementPayment = object
$billingAgreement = object
$awaitingApprovalHTML = string, Awaiting approval HTML template
$alreadyPaidHTML = string, Already paid HTML templaye
$showMultiple = bool, True to show multiple payments on the same payment page
RETURN VALUE:
string = manual payment status as HTMLstatic getBillingIDForProduct(\WMT\Container $container, int $productID, int $productType, \WMT\SQL\Visit\Visitor $visitor) v5
Gets billing id for a product payment
PARAMETERS:
$container = object
$productID = int, Product ID
$productType = int, Product type number
$visitor = object
RETURN VALUE:
int = billing id for a product paymentstatic getCancelBillingHTML(\WMT\SQL\Billing\BillingAgreement $billingAgreement, \WMT\Container $container) v5
Gets cancel billing button as HTML
PARAMETERS:
$billingAgreement = object
$container = object
RETURN VALUE:
string = cancel billing button as HTMLstatic getMatrixHTML(\WMT\Container $container, \WMT\SQL\Billing\Billing $billing, \WMT\SQL\Billing\BillingAgreement $billingAgreement) v5
Gets matrix payment details as HTML. like matrix tracking and matrix passup etc
PARAMETERS:
$container = object
$billing = object
$billingAgreement = object
RETURN VALUE:
string = matrix payment details as HTMLstatic getOtherPaymentOptionsHTML(\WMT\Container $container, string $origBillingID, int $billingID) v5
Gets manual payment options as HTML
PARAMETERS:
$container = object
$origBillingID = string, Other payment billing
$billingID = int, Payment Billing ID
RETURN VALUE:
string = manual payment options as HTMLstatic getPayButtons(\WMT\Container $container, \WMT\SQL\Billing\BillingAgreement $billingAgreement, \WMT\SQL\Billing\BillingAgreementPayment $billingAgreementPayment, \WMT\SQL\Billing\BillingAgreementPayments $billingAgreementPayments) v5
Get payment buttons as HTML
PARAMETERS:
$container = object
$billingAgreement = object
$billingAgreementPayment = object
$billingAgreementPayments = object
RETURN VALUE:
string = payment buttons as HTMLstatic getPositionHTML($matrix, int $i) v5
Gets payment position for matrix payment
PARAMETERS:
$matrix = object
$i = int, Matrix height
RETURN VALUE:
string = matrix payment position as textstatic getPromoCodeHTML(\WMT\Container $container, \WMT\SQL\Billing\BillingAgreementPayment $billingAgreementPayment) v5
Gets payment promo code HTML content
PARAMETERS:
$container = object
$billingAgreementPayment = object
RETURN VALUE:
string = payment promo code HTML contentstatic getTrueProductID(\WMT\Container $container, \WMT\SQL\Visit\Visitor $visitor, int $productID, int &$productType) v5
Gets true product ID (membership ID for membership payment)
PARAMETERS:
$container = object
$visitor = object
$productID = int, Product ID
$productType = int, Product type number
RETURN VALUE:
int = true product ID (membership ID for membership payment)Pay PHP Variables
🔎︎ %l4610%