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.
23 lines
587 B
23 lines
587 B
<?php
|
|
namespace app\common\payment;
|
|
|
|
//實作金流基礎類別
|
|
abstract class BasePayment{
|
|
public function __construct(){
|
|
|
|
}
|
|
|
|
public function generate($input, $action){
|
|
//將傳入的$input array轉成html form,設定action為$action
|
|
$html = '<form id="payment_form" method="post" action="'.$action.'">';
|
|
foreach($input as $key => $value){
|
|
$html .= '<input name="'.$key.'" value="'.$value.'">';
|
|
}
|
|
|
|
$html .= '<input type="submit" value="確定付款"/>';
|
|
$html .= '</form>';
|
|
|
|
return $html;
|
|
}
|
|
}
|