加上付款人
This commit is contained in:
parent
08be6033d9
commit
0c0d1ca775
|
@ -141,6 +141,9 @@ class OrderController extends BaseDefaultController
|
||||||
if(in_array($v['pay_type'],config('adconfig.guma_type')))
|
if(in_array($v['pay_type'],config('adconfig.guma_type')))
|
||||||
{
|
{
|
||||||
$v['ewm_info']='<p>备注:'.($v->ewm_mark??'无').'</p>'.'<p>账号:'.(($v->ewm_account)?($v->ewm_account):'无').'</p>';
|
$v['ewm_info']='<p>备注:'.($v->ewm_mark??'无').'</p>'.'<p>账号:'.(($v->ewm_account)?($v->ewm_account):'无').'</p>';
|
||||||
|
if($v['ewm_name']){
|
||||||
|
$v['ewm_info'].='<p>付款人:'.($v->ewm_name).'</p>';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,20 +60,29 @@ class PayController extends BaseController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function cardConfig():array{
|
||||||
|
return [
|
||||||
|
1 => 'FeilvbinCard',
|
||||||
|
2 => 'KshCard',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $app_id
|
||||||
|
* @return BaseCard|null
|
||||||
|
*/
|
||||||
private function getCard($app_id): ?BaseCard
|
private function getCard($app_id): ?BaseCard
|
||||||
{
|
{
|
||||||
$card = null;
|
$card = null;
|
||||||
switch ($app_id) {
|
$configArr = $this->cardConfig();
|
||||||
case 1:
|
if (isset($configArr[$app_id])) {
|
||||||
$card = new FeilvbinCard();
|
$namespace = '\\App\\ServicePay\TransCard\\';
|
||||||
break;
|
$clazz = $namespace . $configArr[$app_id];
|
||||||
case 2:
|
$card = new $clazz();
|
||||||
$card=new KshCard();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $card;
|
return $card;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,6 +299,7 @@ class GuMaPayServices implements PayApiInterface
|
||||||
'pay_money' => $data['pay_money'], //支付金额,
|
'pay_money' => $data['pay_money'], //支付金额,
|
||||||
'money' => $data['pay_money'],
|
'money' => $data['pay_money'],
|
||||||
'pay_type' => $this->pay_type,
|
'pay_type' => $this->pay_type,
|
||||||
|
'ewm_name' => $data['from_name'],
|
||||||
'account' => ''
|
'account' => ''
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -840,6 +840,7 @@ trait PayTrait
|
||||||
$order->pay_order_sn = $result['pay_order_sn'];//支付流水号
|
$order->pay_order_sn = $result['pay_order_sn'];//支付流水号
|
||||||
//开始更新订单数据
|
//开始更新订单数据
|
||||||
$order->pay_money = $result['pay_money'];//支付金额
|
$order->pay_money = $result['pay_money'];//支付金额
|
||||||
|
$order->ewm_name = $result['ewm_name'];//支付账号姓名
|
||||||
$order->notify_status = 1;//支付回调成功
|
$order->notify_status = 1;//支付回调成功
|
||||||
$order->pay_status = 1;//支付成功
|
$order->pay_status = 1;//支付成功
|
||||||
$order->status = 2;//2=>已支付,待外站回调
|
$order->status = 2;//2=>已支付,待外站回调
|
||||||
|
|
|
@ -8,8 +8,11 @@ class KshCard extends BaseCard
|
||||||
{
|
{
|
||||||
public function message($msg)
|
public function message($msg)
|
||||||
{
|
{
|
||||||
|
//QCE909119D Confirmed You have received Ksh1.00 from Hadija
|
||||||
|
//Edin 0745552949 on 14/3/22 at 5:48 PM New M-PESA balance is
|
||||||
|
//Ksh675.00 Download M-PESA app on http://bit.ly/mpesappsm
|
||||||
$this->msg = $msg;
|
$this->msg = $msg;
|
||||||
$pattern= '/^[A-Z0-9]{9,12}(?=\s)|(?<=Ksh)[\d]+\.[\d]{2}|(?<=from\s)[a-zA-z]*\s[a-zA-z]*|(?<=\s)\d+(?=\s)/';
|
$pattern= '/^[A-Z0-9]{9,12}(?=\s)|(?<=Ksh)[\d]+\.[\d]{2}|(?<=from\s)[a-zA-z]*\s[a-zA-z]*|(?<=\s)\d+(?=\s)|\d{1,2}\/\d{1,2}\/\d{1,4}\sat\s\d{1,2}:\d{2}\s[AMP]{2}/';
|
||||||
$match_num = preg_match_all($pattern, $this->msg, $matches, PREG_PATTERN_ORDER);
|
$match_num = preg_match_all($pattern, $this->msg, $matches, PREG_PATTERN_ORDER);
|
||||||
if ($match_num != false && $match_num > 0 && $matches[0]) {
|
if ($match_num != false && $match_num > 0 && $matches[0]) {
|
||||||
$this->orderInfo = [
|
$this->orderInfo = [
|
||||||
|
@ -17,6 +20,7 @@ class KshCard extends BaseCard
|
||||||
'from_card' => $matches[0][3],
|
'from_card' => $matches[0][3],
|
||||||
'from_name' => $matches[0][2],
|
'from_name' => $matches[0][2],
|
||||||
'order_number' => $matches[0][0],
|
'order_number' => $matches[0][0],
|
||||||
|
'sms_date' => $matches[0][4],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue