1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace Service\Lib;
- use Dever;
- class Pay
- {
- /**
- * 支付成功后,调取的接口
- *
- * @return mixed
- */
- public function act($param)
- {
- $product_id = $param['pay_product_id'];
- $uid = $param['pay_uid'];
- $cash = $param['pay_cash'];
- $order_id = $param['pay_order_id'];
- $status = $param['pay_status'];
- $msg = $param['pay_msg'];
- if ($status == 2) {
- # 支付成功
- //$order_id = 'WX' . $order_id;
- $product = Dever::db('service/product')->one($product_id);
- if ($product) {
- $order = Dever::db('service/order')->one(array('product_id' => $product_id, 'order_id' => $order_id, 'uid' => $uid));
- if ($order) {
- Dever::db('service/order')->update(array('where_id' => $order['id'], 'status' => 2));
- }
- }
- }
- }
- }
|