|
@@ -201,7 +201,14 @@ class Pay extends Base
|
|
|
Log::error('PayService创建失败: ' . $errorMessage);
|
|
|
$this->error('支付服务初始化失败' . (config('app_debug') ? ":" . $errorMessage : ',请重试'));
|
|
|
}
|
|
|
-
|
|
|
+ if (in_array($platform, [ChannelEnum::CHANNEL_ANDROID_APP, ChannelEnum::CHANNEL_IOS_APP])) {
|
|
|
+ if (in_array($payment, ['wechat', 'alipay'])) {
|
|
|
+ // Yansongda\Supports\Collection,可当数组,可当字符串,这里不用处理
|
|
|
+ } else {
|
|
|
+ // Guzzle
|
|
|
+ $result = $result->getBody()->getContents();
|
|
|
+ }
|
|
|
+ }
|
|
|
$this->success('', [
|
|
|
'pay_data' => $result,
|
|
|
]);
|