@@ -71,9 +71,6 @@ public function testGetCVSData()
7171            'orderNote2 '  => 'Order Note 2 ' ,
7272            'expirationDay '  => '2 ' ,
7373            'notificationEmail '  => 
'[email protected]  ,
 74-             // 'returnURL' => 'https://gateway-test.yipay.com.tw/demo/return', 
75-             'cancelURL '  => 'https://gateway-test.yipay.com.tw/demo/cancel ' ,
76-             // 'backgroundURL' => 'https://gateway-test.yipay.com.tw/demo/background', 
7774            'timeout '  => 28800 ,
7875            'validTime '  => '202001011330 ' ,
7976            'timeoutURL '  => 'https://gateway-test.yipay.com.tw/demo/timeout ' ,
@@ -116,4 +113,40 @@ public function testSendCVSData($results)
116113        self ::assertEquals ('https://gateway-test.yipay.com.tw/payment ' , $ responsegetRedirectUrl ());
117114        self ::assertNotEmpty ($ redirectData'checkCode ' ]);
118115    }
116+ 
117+     public  function  testGetATMData ()
118+     {
119+         $ options
120+             'type '  => '4 ' ,
121+             'amount '  => '1500 ' ,
122+             'orderNo '  => 'YP2016111503353 ' ,
123+             'orderDescription '  => 'Order Description ' ,
124+             'orderNote1 '  => 'Order Note 1 ' ,
125+             'orderNote2 '  => 'Order Note 2 ' ,
126+             'expirationDay '  => '2 ' ,
127+             'notificationEmail '  => 
'[email protected]  ,
 128+             'timeout '  => 28800 ,
129+             'validTime '  => '202001011330 ' ,
130+             'timeoutURL '  => 'https://gateway-test.yipay.com.tw/demo/timeout ' ,
131+         ];
132+         $ requestnew  PurchaseRequest ($ this getHttpClient (), $ this getHttpRequest ());
133+         $ requestinitialize (array_merge ([
134+             'merchantId '  => '1604000006 ' ,
135+             'key '  => 'zBaw7bzzD8K1THSGoIbev08xEJp5yzyeuv1MWJDR2L0 ' ,
136+             'iv '  => 'YeQInQjfelvkBcWuyhWDAw== ' ,
137+             'testMode '  => true ,
138+         ], $ options
139+         $ requestsetNotifyUrl ('https://gateway-test.yipay.com.tw/demo/notify ' );
140+         $ requestsetCancelUrl ('https://gateway-test.yipay.com.tw/demo/cancel ' );
141+         $ requestsetPaymentInfoUrl ('https://gateway-test.yipay.com.tw/demo/payment-info ' );
142+ 
143+         self ::assertEquals (array_merge ($ options
144+             'merchantId '  => '1604000006 ' ,
145+             'returnURL '  => 'https://gateway-test.yipay.com.tw/demo/notify ' ,
146+             'cancelURL '  => 'https://gateway-test.yipay.com.tw/demo/cancel ' ,
147+             'backgroundURL '  => 'https://gateway-test.yipay.com.tw/demo/payment-info ' ,
148+         ]), $ requestgetData ());
149+ 
150+         return  [$ requestsend (), $ options
151+     }
119152}
0 commit comments