Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
P
php-stpp
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
common
php-stpp
Commits
72b4b00a
Commit
72b4b00a
authored
Nov 04, 2013
by
David Weston
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some small changes
parent
c89ab30f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
10 deletions
+30
-10
objects/stppaddressableobject.php
objects/stppaddressableobject.php
+1
-1
objects/stppbilling.php
objects/stppbilling.php
+1
-1
objects/stppcustomer.php
objects/stppcustomer.php
+1
-1
objects/stppmerchant.php
objects/stppmerchant.php
+1
-1
objects/stppobject.php
objects/stppobject.php
+1
-1
objects/stppoperation.php
objects/stppoperation.php
+1
-1
objects/stppresponse.php
objects/stppresponse.php
+19
-2
objects/stppsettlement.php
objects/stppsettlement.php
+1
-1
stapi.php
stapi.php
+4
-1
No files found.
objects/stppaddressableobject.php
View file @
72b4b00a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* The addressable object includes functionality for addresses and such, as
* The addressable object includes functionality for addresses and such, as
* quite a lot of functionality is shared between billing and customers, for
* quite a lot of functionality is shared between billing and customers, for
* example.
* example.
*
*
* @version: untested
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
...
objects/stppbilling.php
View file @
72b4b00a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* the card and the like. It's recommended that everything stuck into
* the card and the like. It's recommended that everything stuck into
* this class matches the name registered on the card. Addresses
* this class matches the name registered on the card. Addresses
* are also key.
* are also key.
*
*
* @version: untested
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
...
objects/stppcustomer.php
View file @
72b4b00a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Customer information does not constitute billing information, so there's
* Customer information does not constitute billing information, so there's
* no real need to fill in anything like addresses and such - however there
* no real need to fill in anything like addresses and such - however there
* /is/ a recommendation from ST to do so.
* /is/ a recommendation from ST to do so.
*
*
* @version: untested
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
...
objects/stppmerchant.php
View file @
72b4b00a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* Merchant information is usually not required when using STPP, however
* Merchant information is usually not required when using STPP, however
* it is a required feature for 3D-Secure, which most if not all
* it is a required feature for 3D-Secure, which most if not all
* transactions should be performed using (if available).
* transactions should be performed using (if available).
*
*
* @version: untested
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
...
objects/stppobject.php
View file @
72b4b00a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* This is the god object for all parts of the request, such as
* This is the god object for all parts of the request, such as
* the merchant, operations and such.
* the merchant, operations and such.
*
*
* @version: untested
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
...
objects/stppoperation.php
View file @
72b4b00a
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* The operation object contains some other information that is needed
* The operation object contains some other information that is needed
* to complete the request.
* to complete the request.
*
*
* @version: untested
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
...
objects/stppresponse.php
View file @
72b4b00a
...
@@ -5,6 +5,10 @@
...
@@ -5,6 +5,10 @@
* The STPPResponse object parses the response from the SecureTrading endpoint,
* The STPPResponse object parses the response from the SecureTrading endpoint,
* and puts it into a nice easy to use output.
* 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
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
@@ -42,10 +46,10 @@ class STPPResponse
...
@@ -42,10 +46,10 @@ class STPPResponse
*/
*/
public
function
isSuccessful
()
public
function
isSuccessful
()
{
{
if
(
!
isset
(
$this
->
feed
->
error
->
code
))
if
(
!
isset
(
$this
->
feed
->
response
->
error
->
code
))
return
null
;
return
null
;
return
((
integer
)
$this
->
feed
->
error
->
code
==
0
);
return
((
integer
)
$this
->
feed
->
response
->
error
->
code
==
0
);
}
}
...
@@ -101,4 +105,17 @@ class STPPResponse
...
@@ -101,4 +105,17 @@ class STPPResponse
return
$set
;
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
objects/stppsettlement.php
View file @
72b4b00a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* PHP based wrapper for SecureTrading's new STPP protocol.
* PHP based wrapper for SecureTrading's new STPP protocol.
*
*
* This is the object that represents updated settlement details.
* This is the object that represents updated settlement details.
*
*
* @version: untested
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
...
stapi.php
View file @
72b4b00a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* This won't allow you to connect your system immediately
* This won't allow you to connect your system immediately
* to a setup, however, it'll allow you to with ease create
* to a setup, however, it'll allow you to with ease create
* and maintain a new contract with a SecureTrading node.
* and maintain a new contract with a SecureTrading node.
*
*
* @version: untested
* @version: untested
* @author: David Weston <stpp@typefish.co.uk>
* @author: David Weston <stpp@typefish.co.uk>
*/
*/
...
@@ -299,6 +299,9 @@ class STAPI
...
@@ -299,6 +299,9 @@ class STAPI
$method
,
$method
,
);
);
if
(
!
method_exists
(
$callback
[
0
],
$callback
[
1
]))
return
null
;
$result
=
call_user_func_array
(
$callback
,
$arguments
);
$result
=
call_user_func_array
(
$callback
,
$arguments
);
if
(
$result
instanceof
STPPObject
)
if
(
$result
instanceof
STPPObject
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment