|
...
|
...
|
@@ -70,6 +70,7 @@ class MembershipOfferController extends GetxController { |
|
|
|
AppleProductPaymentResult? result,
|
|
|
|
) async {
|
|
|
|
if (result?.success == true) {
|
|
|
|
_trackSuccessPayOrder();
|
|
|
|
await _completeSuccessfulPurchase();
|
|
|
|
return;
|
|
|
|
}
|
|
...
|
...
|
@@ -81,6 +82,22 @@ class MembershipOfferController extends GetxController { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void _trackSuccessPayOrder() {
|
|
|
|
final trackMap = <String, dynamic>{};
|
|
|
|
if (Get.arguments?['from'] == 'onboarding') {
|
|
|
|
trackMap['channel_type'] = '新手引导';
|
|
|
|
} else {
|
|
|
|
trackMap['channel_type'] = Get.arguments?['channel_type'] ?? '';
|
|
|
|
}
|
|
|
|
trackMap['product_type'] = yearlyProduct.value?.appleId;
|
|
|
|
trackMap['price'] = yearlyProduct.value?.price;
|
|
|
|
|
|
|
|
ta.track(
|
|
|
|
'success_doublefeel_pay_order',
|
|
|
|
properties: trackMap,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
String _applePaymentFailureMessage(AppleProductPaymentResult result) {
|
|
|
|
final errorCode = result.errorCode;
|
|
|
|
if (errorCode != null) {
|
...
|
...
|
|