File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -235,16 +235,18 @@ public function testCaptureParameters()
235
235
236
236
public function testPurchaseParameters ()
237
237
{
238
- foreach ($ this ->gateway ->getDefaultParameters () as $ key => $ default ) {
239
- // set property on gateway
240
- $ getter = 'get ' .ucfirst ($ key );
241
- $ setter = 'set ' .ucfirst ($ key );
242
- $ value = uniqid ();
243
- $ this ->gateway ->$ setter ($ value );
238
+ if ($ this ->gateway ->supportsPurchase ()) {
239
+ foreach ($ this ->gateway ->getDefaultParameters () as $ key => $ default ) {
240
+ // set property on gateway
241
+ $ getter = 'get ' .ucfirst ($ key );
242
+ $ setter = 'set ' .ucfirst ($ key );
243
+ $ value = uniqid ();
244
+ $ this ->gateway ->$ setter ($ value );
244
245
245
- // request should have matching property, with correct value
246
- $ request = $ this ->gateway ->purchase ();
247
- $ this ->assertSame ($ value , $ request ->$ getter ());
246
+ // request should have matching property, with correct value
247
+ $ request = $ this ->gateway ->purchase ();
248
+ $ this ->assertSame ($ value , $ request ->$ getter ());
249
+ }
248
250
}
249
251
}
250
252
You can’t perform that action at this time.
0 commit comments