处理收到的收款推送,将各支付方式的处理方法合并. 20%
parent
43e9c8a68e
commit
4decfcfae7
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class PaymentService extends CI_Controller {
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
bcscale(2);
|
||||
$this->load->helper('payment');
|
||||
// $this->config->load('wxpay', true);
|
||||
$this->load->model('Online_payment_note_model', 'note_model');
|
||||
$this->load->model('Online_payment_account_model', 'account_model');
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function send_notify($payment_method=NULL, $transactionId=NULL)
|
||||
{
|
||||
// $save_column['OPN_accountType'] = $xml_arr[''];
|
||||
// $save_column['OPN_accountStatus'] = $xml_arr[''];
|
||||
// $save_column['OPN_accountTime'] = $xml_arr[''];
|
||||
$data = array();
|
||||
$int = 0;
|
||||
|
||||
//优先处理指定的交易号,用于修正交易号直接发送通知
|
||||
if ( ! empty($transactionId)) {
|
||||
$data['unsend_list'] = $this->note_model->get_note($payment_method, $transactionId);
|
||||
}
|
||||
// 待处理的
|
||||
if (empty($data['unsend_list'])) {
|
||||
$data['unsend_list'] = $this->note_model->unsend_note($payment_method, 10);
|
||||
}
|
||||
//没有未处理的数据再查找处理失败的数据
|
||||
if (empty($data['unsend_list'])) {
|
||||
$data['unsend_list'] = $this->note_model->sendfail_note($payment_method, 20);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue