Source Docs for PHP Library
Class: \Paynow\Core\Constants
Visibility | Function |
---|
Class: \Paynow\Core\InitResponse
Visibility | Function |
---|---|
public | __construct(array $response) : void InitResponse constructor. |
public | data() : array Get the original data sent from Paynow |
public | errors(bool $pretty=true) : string/array Get the errors sent by Paynow |
public | instructions() : void |
public | pollUrl() : bool/string Returns the poll URL sent from Paynow |
public | redirectUrl() : bool/string Returns the url the user should be taken to so they can make a payment |
public | success() : mixed Gets a boolean indicating whether a request succeeded or failed |
Class: \Paynow\Core\Logger
Class Logger
Visibility | Function |
---|
Class: \Paynow\Core\StatusResponse
Visibility | Function |
---|---|
public | __construct(array $response) : void Default constructor |
public | amount() : float/mixed Returns the amount of the transaction, -1 if not available Get the original amount of the transaction |
public | data() : array Get the original data sent from Paynow |
public | errors(bool $pretty=true) : string/array Get the errors sent by Paynow |
public | paid() : mixed/string Get the status of the transaction |
public | paynowReference() : void |
public | reference() : void |
public | status() : mixed/string Get the status of the transaction |
Class: \Paynow\Http\Client
HTTP Client
Visibility | Function |
---|---|
public | __construct() : void Default Constructor |
public | execute(\Paynow\Http\RequestInfo $info) : mixed Executes an HTTP request |
Class: \Paynow\Http\ConnectionException
Exception thrown if an error occurs while sending Http request
Visibility | Function |
---|
This class extends \Exception
This class implements \Throwable
Class: \Paynow\Http\RequestInfo
Stores parameters for an http request
Visibility | Function |
---|---|
public static | create(string $url, string $method, array $data=array()) : \Paynow\Http\RequestInfo Create a new RequestInfo object |
public | getData() : string Gets the data for the http request as an http query string |
public | getMethod() : string Get the method for the http request |
public | getUrl() : string Get the url for the http request |
Class: \Paynow\Payments\EmptyCartException
Exception thrown when there's an attempt to send an empty cart to Paynow
Visibility | Function |
---|---|
public | __construct(\Paynow\Payments\FluentBuilder $builder) : void EmptyCartException constructor. |
This class extends \InvalidArgumentException
This class implements \Throwable
Class: \Paynow\Payments\EmptyTransactionReferenceException
Exception thrown when there's an attempt to send a transaction without a reference to Paynow
Visibility | Function |
---|---|
public | __construct(mixed $builder) : void |
This class extends \InvalidArgumentException
This class implements \Throwable
Class: \Paynow\Payments\FluentBuilder
Visibility | Function |
---|---|
public | __construct(mixed $ref, string $authEmail='' ) : voidDefault constructor |
public | __get(mixed $name) : void |
public | add(string/array $item, float/int $amount=null) : void Add a new item to the list |
public | computeTotal() : void |
public | itemsDescription() : void Get the description |
public | setDescription(mixed $description) : void |
public | toArray() : void Convert the builder to an array |
protected | parseItems(array $items) : void Parse an array of items |
Class: \Paynow\Payments\HashMismatchException
Exception thrown if the hash sent from Paynow does not match the one generated locally
Visibility | Function |
---|
This class extends \Exception
This class implements \Throwable
Class: \Paynow\Payments\InvalidIntegrationException
Exception thrown if wrong credentials are used to make a request to Paynow
Visibility | Function |
---|
This class extends \Exception
This class implements \Throwable
Class: \Paynow\Payments\InvalidUrlException
Exception thrown when return or result url's are not set
Visibility | Function |
---|
This class extends \InvalidArgumentException
This class implements \Throwable
Class: \Paynow\Payments\NotImplementedException
Visibility | Function |
---|
This class extends \Exception
This class implements \Throwable
Class: \Paynow\Payments\Payment
Visibility | Function |
---|---|
public | __get(mixed $name) : void |
public | add(string/array $item, float/int $amount=null) : void Add a new item to the list |
public | computeTotal() : void Calculate the total of the items in the 'cart' |
public static | create(string $ref, string $authEmail='' ) : voidCreate an instance of the payment class (for normal payments) |
public static | createMobile(string $ref, string $authEmail, string $phone, string $method) : void Create an instance of the payment class (for mobile payments) |
public | itemsDescription() : void Get the description for the items in the cart |
public | setDescription(string $description) : void Sets the description for the transaction |
public | toArray() : void Convert the builder to an array |
protected | parseItems(array $items) : void Parse an array of items |
Class: \Paynow\Payments\Paynow
Visibility | Function |
---|---|
public | __construct(string $id, string $key, mixed $returnUrl, mixed $resultUrl) : void Default constructor. |
public | createMobilePayment(string/null $ref, mixed $authEmail) : \Paynow\Payments\FluentBuilder |
public | createPayment(string/null $ref) : \Paynow\Payments\FluentBuilder |
public | getResultUrl() : string Get the result url for the merchant |
public | getReturnUrl() : string Get the merchant's return url |
public | pollTransaction(mixed $url) : \Paynow\Core\StatusResponse Check the status of a transaction |
public | processStatusUpdate() : \Paynow\Core\StatusResponse Process a status update from Paynow |
public | send(\Paynow\Payments\FluentBuilder/array $builder) : \Paynow\Core\InitResponse Send a transaction to Paynow |
public | sendMobile(\Paynow\Payments\FluentBuilder $builder, mixed $phone, mixed $method) : \Paynow\Core\InitResponse Send a mobile transaction |
public | setResultUrl(string $resultUrl) : void Sets the merchant's result url |
public | setReturnUrl(string $returnUrl) : void Sets the merchant's return url |
protected | init(\Paynow\Payments\FluentBuilder $builder) : InitResponse The response from Paynow Initiate a new Paynow transaction |
protected | initMobile(\Paynow\Payments\FluentBuilder $builder, string $phone, string $method) : InitResponse The response from Paynow Initiate a new Paynow transaction |
Class: \Paynow\Util\Hash
Visibility | Function |
---|---|
public static | make(array $values, mixed $integration_key) : void |
public static | verify(mixed $values, mixed $key) : void |