Commit 72b4b00a authored by David Weston's avatar David Weston

Some small changes

parent c89ab30f
......@@ -5,7 +5,7 @@
* The addressable object includes functionality for addresses and such, as
* quite a lot of functionality is shared between billing and customers, for
* example.
*
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -6,7 +6,7 @@
* the card and the like. It's recommended that everything stuck into
* this class matches the name registered on the card. Addresses
* are also key.
*
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -9,7 +9,7 @@
* Customer information does not constitute billing information, so there's
* no real need to fill in anything like addresses and such - however there
* /is/ a recommendation from ST to do so.
*
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -9,7 +9,7 @@
* Merchant information is usually not required when using STPP, however
* it is a required feature for 3D-Secure, which most if not all
* transactions should be performed using (if available).
*
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -4,7 +4,7 @@
*
* This is the god object for all parts of the request, such as
* the merchant, operations and such.
*
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -4,7 +4,7 @@
*
* The operation object contains some other information that is needed
* to complete the request.
*
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -5,6 +5,10 @@
* The STPPResponse object parses the response from the SecureTrading endpoint,
* and puts it into a nice easy to use output.
*
* This class can be used to revisit previous transactions. All you need to do is
* give the XML response as the argument to the constructor and all will be
* revealed.
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......@@ -42,10 +46,10 @@ class STPPResponse
*/
public function isSuccessful()
{
if(!isset($this->feed->error->code))
if(!isset($this->feed->response->error->code))
return null;
return ((integer) $this->feed->error->code == 0);
return ((integer) $this->feed->response->error->code == 0);
}
......@@ -101,4 +105,17 @@ class STPPResponse
return $set;
}
/**
* Check if the response indicated that this request/response pair
* actually is associated with the testing environment or not.
*/
public function isLiveEnvironment()
{
if(!isset($this->feed->response->live))
return null;
return ((integer) $this->feed->response->live == 1);
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
* PHP based wrapper for SecureTrading's new STPP protocol.
*
* This is the object that represents updated settlement details.
*
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......
......@@ -5,7 +5,7 @@
* This won't allow you to connect your system immediately
* to a setup, however, it'll allow you to with ease create
* and maintain a new contract with a SecureTrading node.
*
*
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
*/
......@@ -299,6 +299,9 @@ class STAPI
$method,
);
if(!method_exists($callback[0], $callback[1]))
return null;
$result = call_user_func_array($callback, $arguments);
if($result instanceof STPPObject)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment