Commit f3a64b27d2497f93cba6a02341e76fe441420349

Authored by 刘宏哲
Committed by 权海
1 parent fb921048

feat(app): change productChannel

... ... @@ -209,7 +209,11 @@ class PurchaseController extends GetxController {
Future<void> _unlockWithAlipay(int productId) async {
isUnlocking.value = true;
try {
final orderResult = await _payApi.createOrder(productId: productId);
final orderResult = await _payApi.createOrder(
productId: productId,
paymentChannel: PaymentChannel.alipay.value,
productChannel: ProductChannel.huawei.value,
);
if (orderResult case AppFailure<CreatePayOrderResponse>(:final error)) {
AppToast.show(error.displayMessage);
return;
... ...
import 'package:doublefeel_flutter/app/utils/platform_compact.dart';
import 'package:doublefeel_flutter/data/models/pay/apple_pay_order_response.dart';
import '../../../data/models/pay/pay_models.dart';
import '../../result/app_result.dart';
import '../../result/safe_call.dart';
import '../../../data/models/pay/pay_models.dart';
import '../api_paths.dart';
import '../dio_client.dart';
... ... @@ -53,7 +53,8 @@ class PayApi {
Future<AppResult<CreatePayOrderResponse>> createOrder({
required int productId,
int paymentChannel = 2,
required int paymentChannel,
required int productChannel,
}) {
return safeCall(
call: () async {
... ... @@ -62,6 +63,7 @@ class PayApi {
data: CreatePayOrderRequest(
productId: productId,
paymentChannel: paymentChannel,
productChannel: productChannel,
).toJson(),
);
return CreatePayOrderResponse.fromJson(
... ... @@ -125,6 +127,7 @@ enum ProductType {
subscriptionVip(10);
const ProductType(this.value);
final int value;
}
... ... @@ -140,6 +143,7 @@ enum ProductChannel {
huawei(3);
const ProductChannel(this.value);
final int value;
}
... ... @@ -155,5 +159,6 @@ enum PaymentChannel {
apple(3);
const PaymentChannel(this.value);
final int value;
}
... ...
... ... @@ -2,7 +2,7 @@
"app": {
"bundleName": "com.doublefeel.hmapp",
"vendor": "DiDi",
"versionCode": 100,
"versionCode": 101,
"versionName": "2.7.0",
"icon": "$media:layered_image",
"label": "$string:app_name"
... ...
... ... @@ -2,7 +2,7 @@ name: doublefeel_flutter
description: "A new Flutter project."
publish_to: 'none'
version: 2.7.0+100
version: 2.7.0+101
environment:
sdk: ^3.6.2
... ...
... ... @@ -2,7 +2,7 @@ name: doublefeel_flutter
description: "A new Flutter project."
publish_to: 'none'
version: 2.7.0+100
version: 2.7.0+101
environment:
sdk: ^3.6.2
... ...