File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,16 @@ public function supportsAuthorize()
119
119
return method_exists ($ this , 'authorize ' );
120
120
}
121
121
122
+ /**
123
+ * Supports Complete Authorize
124
+ *
125
+ * @return boolean True if this gateway supports the completeAuthorize() method
126
+ */
127
+ public function supportsCompleteAuthorize ()
128
+ {
129
+ return method_exists ($ this , 'completeAuthorize ' );
130
+ }
131
+
122
132
/**
123
133
* Supports Capture
124
134
*
@@ -129,6 +139,16 @@ public function supportsCapture()
129
139
return method_exists ($ this , 'capture ' );
130
140
}
131
141
142
+ /**
143
+ * Supports Complete Purchase
144
+ *
145
+ * @return boolean True if this gateway supports the completePurchase() method
146
+ */
147
+ public function supportsCompletePurchase ()
148
+ {
149
+ return method_exists ($ this , 'completePurchase ' );
150
+ }
151
+
132
152
/**
133
153
* Supports Refund
134
154
*
Original file line number Diff line number Diff line change @@ -89,6 +89,18 @@ public function testSupportsAuthorize()
89
89
}
90
90
}
91
91
92
+ public function testSupportsCompleteAuthorize ()
93
+ {
94
+ $ supportsCompleteAuthorize = $ this ->gateway ->supportsCompleteAuthorize ();
95
+ $ this ->assertInternalType ('boolean ' , $ supportsCompleteAuthorize );
96
+
97
+ if ($ supportsCompleteAuthorize ) {
98
+ $ this ->assertInstanceOf ('Omnipay\Common\Message\RequestInterface ' , $ this ->gateway ->completeAuthorize ());
99
+ } else {
100
+ $ this ->assertFalse (method_exists ($ this ->gateway , 'completeAuthorize ' ));
101
+ }
102
+ }
103
+
92
104
public function testSupportsCapture ()
93
105
{
94
106
$ supportsCapture = $ this ->gateway ->supportsCapture ();
@@ -101,6 +113,18 @@ public function testSupportsCapture()
101
113
}
102
114
}
103
115
116
+ public function testSupportsCompletePurchase ()
117
+ {
118
+ $ supportsCompletePurchase = $ this ->gateway ->supportsCompletePurchase ();
119
+ $ this ->assertInternalType ('boolean ' , $ supportsCompletePurchase );
120
+
121
+ if ($ supportsCompletePurchase ) {
122
+ $ this ->assertInstanceOf ('Omnipay\Common\Message\RequestInterface ' , $ this ->gateway ->completePurchase ());
123
+ } else {
124
+ $ this ->assertFalse (method_exists ($ this ->gateway , 'completePurchase ' ));
125
+ }
126
+ }
127
+
104
128
public function testSupportsRefund ()
105
129
{
106
130
$ supportsRefund = $ this ->gateway ->supportsRefund ();
You can’t perform that action at this time.
0 commit comments