|
@@ -498,13 +498,18 @@ class Journal extends Core
|
|
|
|
|
|
$source_type = Dever::input('source_type');
|
|
|
|
|
|
- if ($source_type == 'ios' || $source_type == 'android') {
|
|
|
- $method = 'app';
|
|
|
- if ($source_type == 'ios') {
|
|
|
- $order_data['system'] = 3;
|
|
|
- } else {
|
|
|
- $order_data['system'] = 4;
|
|
|
+ if ($source_type == 'ios') {
|
|
|
+ $method = 'apple';
|
|
|
+ $order_data['system'] = 3;
|
|
|
+ $account_id = 3;
|
|
|
+ # 使用苹果内购支付
|
|
|
+ $receipt = Dever::input('receipt');
|
|
|
+ if (!$receipt) {
|
|
|
+ Dever::alert('苹果内购支付失败,没有receipt参数');
|
|
|
}
|
|
|
+ } elseif ($source_type == 'android') {
|
|
|
+ $method = 'app';
|
|
|
+ $order_data['system'] = 4;
|
|
|
$account_id = 3;
|
|
|
} else {
|
|
|
$method = 'applet';
|
|
@@ -562,6 +567,10 @@ class Journal extends Core
|
|
|
'order_id' => $order_id,
|
|
|
);
|
|
|
|
|
|
+ if ($method == 'apple') {
|
|
|
+ $param['other'] = $receipt;
|
|
|
+ }
|
|
|
+
|
|
|
$this->data['pay'] = Dever::load('pay/api.' . $method, $param);
|
|
|
|
|
|
if ($order_data['system'] == 1) {
|