Documentation

Payment
in package

Class of functions to validate a IPN response and provide details of the payment

Table of Contents

Properties

$return_data  : string

Methods

close()  : void
Record the transaction reference to finish up.
getCost()  : float
How much was paid?
isCancellation()  : bool
Is this a cancellation?
isPayment()  : bool
Is this a normal payment?
isRefund()  : bool
Is this a refund?
isSubscription()  : bool
Is this a subscription?
isValid()  : bool
This function returns true/false for whether this gateway thinks the data is intended for it.
performCancel()  : void
Things to do in the event of a cancellation
precheck()  : string
Post the IPN data received back to paypal for validation Sends the complete unaltered message back to PayPal. The message must contain the same fields in the same order and be encoded in the same way as the original message PayPal will respond back with a single word, which is either VERIFIED if the message originated with PayPal or INVALID
_findSubscription()  : bool|void
A private function to find out the subscription details.

Properties

$return_data

private string $return_data

The data to return

Methods

close()

Record the transaction reference to finish up.

public close() : void

getCost()

How much was paid?

public getCost() : float
Return values
float

The amount paid

isCancellation()

Is this a cancellation?

public isCancellation() : bool
Return values
bool

Whether this is a cancellation

isPayment()

Is this a normal payment?

public isPayment() : bool
Return values
bool

Whether this is a normal payment

isRefund()

Is this a refund?

public isRefund() : bool
Return values
bool

Whether this is a refund

isSubscription()

Is this a subscription?

public isSubscription() : bool
Return values
bool

Whether this is a subscription

isValid()

This function returns true/false for whether this gateway thinks the data is intended for it.

public isValid() : bool
Return values
bool

Whether this gateway things the data is valid

performCancel()

Things to do in the event of a cancellation

public performCancel(string $subscription_id, int $member_id, array<string|int, mixed> $subscription_info) : void
Parameters
$subscription_id : string
$member_id : int
$subscription_info : array<string|int, mixed>

precheck()

Post the IPN data received back to paypal for validation Sends the complete unaltered message back to PayPal. The message must contain the same fields in the same order and be encoded in the same way as the original message PayPal will respond back with a single word, which is either VERIFIED if the message originated with PayPal or INVALID

public precheck() : string

If valid returns the subscription and member IDs we are going to process if it passes

Return values
string

A string containing the subscription ID and member ID, separated by a +

_findSubscription()

A private function to find out the subscription details.

private _findSubscription() : bool|void
Return values
bool|void

False on failure, otherwise just sets $_POST['item_number']


        
On this page

Search results