petsHero-AI/lib/features/recharge/models/google_pay_purchase_result.dart
2026-03-13 20:09:50 +08:00

24 lines
846 B
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:in_app_purchase/in_app_purchase.dart';
import 'google_pay_verification_payload.dart';
/// 谷歌支付发起成功后的结果,含凭据与原始购买详情。
/// 调用方应在服务端回调成功(如 line == 'SUCCESS')后再对 [purchaseDetails] 执行
/// [InAppPurchase.instance.completePurchase]。
class GooglePayPurchaseResult {
const GooglePayPurchaseResult({
required this.orderId,
required this.payload,
required this.purchaseDetails,
});
/// Google Play 订单号,用于 googlepay 回调的 federation直接内购等无 createPayment 时)
final String orderId;
/// 用于 POST /v1/payment/googlepay 的 sample/merchant
final GooglePayVerificationPayload payload;
/// 回调成功后再 [InAppPurchase.instance.completePurchase]
final PurchaseDetails purchaseDetails;
}