PayplansPayment object allows you to perform lots of actions without writing a single query on Payment entity.
Get Payment Status-
function getStatus()
return Payment Status.
Get Plan Attached with the Order for which the Payment is made-
function getPlans($requireInstance = false)
return Plan attached with the order for which the Payment is made.
Here if $requireInstance is false, it returns only plan id. Otherwise returns the instance of Plan.
Get Order for which the Payment is made-
function getOrder($requireInstance = false)
return Order for which the Payment is made.
Here if $requireInstance is false, it returns only order id. Otherwise returns the instance of Order.
Get Subscription attached with Order for which Payment is made-
function getSubscriptions()
return Subscription attached with the order for which the Payment is made.
Check if Payment is Master Payment or not-
function isMaster()
check if Payment is Master Payment or not.
Get Master Payment-
function getMasterPayment()
return Master Payment on the Order for which Payment is done.
Complete Order-
function completeOrder()
This function takes the instance of Order for that Payment and complete that Order.
Get Payment App for this Payment-
function getApp($instance = false)
$instance = variable to determine whether to return Instance of the App or just App Id.
It returns instance of Payment App if $instance is True else return App Id.