1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace refill\oufei;
- require_once(BASE_HELPER_RAPI_PATH . '/oufei/config.php');
- use refill;
- class RefillCallBack implements refill\IRefillCallBack
- {
- public function verify($params): bool
- {
- return true;
- }
- public function notify($params)
- {
- $status = intval($params['ret_code']);
- $order_sn = $params['sporder_id'];
- $order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
- if (empty($order_info)) {
- // return [false, false, false,false];
- }
- $order_id = $order_info['order_id'];
- if ($status === 1) {
- return [$order_id, true, false, true];
- } elseif ($status === 9) {
- return [$order_id, false, true, true];
- } else {
- return [$order_id, false, false, false];
- }
- }
- }
|