1. Go to this page and download the library: Download gajus/strading library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gajus / strading example snippets
/**
* @param string $site_reference The Merchant's Site Reference.
* @param string $username
* @param string $password
* @param string $interface_url
*/
$service = new \Gajus\Strading\Service('test_github53934', '[email protected]', '93gbjdMR');
/**
* Transaction abstracts access to the most generic information about the response:
*
* - request_reference
* - transaction_type
* - transaction_reference
* - timestamp
* - parent_transaction_reference
* - authcode
* - amount
* - paypal_token
*
* Presence of this data will depend on the type of the response you receive, e.g.
* only PayPal order request will () {
return $this->redirect_url;
}
/**
* @return string Response type.
*/
public function getType () {
return $this->type;
}
/**
* @return string Raw XML response.
*/
public function getXML () {
return $this->xml->asXML();
}
/**
* @return string
*/
public function getCode () {
return $this->code;
}
/**
* @return string
*/
public function getMessage () {
return $this->message;
}
/**
* This tag contains one or more child elements. If the error code is "30000" (Field Error)
* then this field will contain the field (or fields) which caused the error.
*
* @todo https://github.com/gajus/strading/issues/1
* @return string
*/
public function getData () {
return $this->data;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.