You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

<?php
namespace app\common\payment;
use GuzzleHttp\Client;
use app\common\payment\Ipayment;
//實作金流串接介面
class GomypayATM implements Ipayment{
public function pay( $order ){
$rtn = <<<EOF
<FORM action=" https://n.gomypay.asia/TestShuntClass.aspx" method="get">
<input name='Send_Type' value='4'>
<input name='Pay_Mode_No' value='2'>
<input name='CustomerId' value='07683D4B993BDC85B8C5952707CC43A3'>
<input name='Order_No' placeholder='訂單號' value='{$order['sn']}'>
<input name='Amount' value='{$order['amount']}'>
<input name='Buyer_Name' value='許家威'>
<input name='Buyer_Telm' value='0983214434'>
<input name='Buyer_Mail' value='wwayne.hsu@gmal.com'>
<input name='Buyer_Memo' value='商品資訊'>
<input name='Return_url' value='https://shop.h888.fun/appapi/v1/payment/response/paycode/gmpcvs/'>
<input name='Str_Check' value='4w142n2uk4fgm57jwqjrwbgakl5rp5ws'>
<input type="submit" value="確定付款"/>
</form>
EOF;
return ['code'=>200,'method'=>'post','data'=>$rtn];
}
public function response($data){
return ['code'=>404];
}
public function callback($data){
return ['code'=>404];
}
}