|
@@ -14,6 +14,7 @@ class config
|
|
|
public const ERRCODES = [600,602,603,606,622,623,624,615,637,751];
|
|
|
|
|
|
const ExtHeaders = ['Content-Type: application/json;charset=UTF-8'];
|
|
|
+ const callback_keys = ['client_order_no', 'deduction_amount', 'elecardID', 'phone_no', 'product_type', 'recharge_status', 'up_order_no'];
|
|
|
|
|
|
public const ERRMSG = [
|
|
|
600 => '商户禁用,接口已关闭',
|
|
@@ -41,4 +42,16 @@ class config
|
|
|
|
|
|
return strtolower(md5($body));
|
|
|
}
|
|
|
+
|
|
|
+ public static function cbsign($params,$keys)
|
|
|
+ {
|
|
|
+ $body = "";
|
|
|
+ foreach ($keys as $key) {
|
|
|
+ $val = $params[$key] ?? '';
|
|
|
+ $body .= "$key" . "$val";
|
|
|
+ }
|
|
|
+
|
|
|
+ $body .= config::SECRET_KEY;
|
|
|
+ return strtolower(md5($body));
|
|
|
+ }
|
|
|
}
|