方法名参数返回值
notify无/array/ServerRequestInterfaceCollection

例子

$pay = new \fengkui\Pay\Bytedance($bytedanceConfig);

// 支付回调
try {
    $data = $pay->notify(); // 验签并获取支付回调相关参数
    if ($data) { // 支付成功
        return $pay->success(); // 异步通知
    }
} catch (\Exception $e) {
    $e->getMessage(); // 错误信息
}

通知参数

相关通知参数说明,请参考这里open in new window,查看「通知参数说明」一栏。

{
    "timestamp": 1602507471,
    "nonce": "797",
    "msg": "{\"appid\":\"tt07e3715e98c9aac0\",\"cp_orderno\":\"out_order_no_1\",\"cp_extra\":\"\",\"way\":\"2\",\"payment_order_no\":\"2021070722001450071438803941\",\"total_amount\":9980,\"status\":\"SUCCESS\",\"seller_uid\":\"69631798443938962290\",\"extra\":\"null\",\"item_id\":\"\"}",
    "msg_signature": "52fff5f7a4bf4a921c2daf83c75cf0e716432c73",
    "type": "payment"
}
Last Updated:
Contributors: kuifeng