StripePurchase class

Controller for the actual payment by the customer with the payment method created in StripePayment.create.

Execute create->confirm->capture in that order to cause the actual movement of money.

The cancel and refund buttons can be used to cancel a transaction or to refund money after it has been transferred.

StripePayment.createで作成した支払い方法を持つカスタマーが実際の支払いを行うためのコントローラー。

create->confirm->captureの順で実行すると実際の金銭の移動が発生します。

cancelrefundによって途中のキャンセルや金銭の移動後の返金処理を実行可能です。

Inheritance

Constructors

StripePurchase({required String userId, StripePurchaseMasamuneAdapter? adapter})
Controller for the actual payment by the customer with the payment method created in StripePayment.create.

Properties

adapter StripePurchaseMasamuneAdapter
TAdapter to be used.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
primaryAdapter StripePurchaseMasamuneAdapter
Specifies the default TAdapter if adapter is Null.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId String
User ID in the application.
final
value → void
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
cancel({required DocumentBase<StripePurchaseModel> purchase, Duration timeout = const Duration(seconds: 15)}) Future<void>
Cancel purchase.
capture({required DocumentBase<StripePurchaseModel> purchase, double? priceAmountOverride, Duration timeout = const Duration(seconds: 15)}) Future<void>
Executed when the actual flow of money is generated after confirm.
confirm({required DocumentBase<StripePurchaseModel> purchase, bool online = true, required void builder(Uri endpoint, Widget webView, VoidCallback onClosed), VoidCallback? onClosed, Duration timeout = const Duration(seconds: 15)}) Future<void>
Confirm purchase.
create({required String orderId, required double priceAmount, String? targetUserId, String? description, Locale locale = const Locale("en", "US"), Duration timeout = const Duration(seconds: 15), String? emailTitleOnRequired3DSecure, String? emailContentOnRequired3DSecure}) Future<void>
Specify orderId and create payment information for the amount in priceAmount.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
refresh({required StripePurchaseModel purchase}) Future<void>
Change the purchase payment method to the default set in the app.
refund({required DocumentBase<StripePurchaseModel> purchase, double? refundAmount, Duration timeout = const Duration(seconds: 15)}) Future<void>
purchase refund process.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setValueInternal(void value) → void
Set method is used to update the current state.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

collection → const _$$_StripePurchaseModelCollectionQuery
Use this to retrieve the related StripePurchaseModel collection.
document → const _$$_StripePurchaseModelDocumentQuery
Use this to retrieve the relevant StripePurchaseModel documentation.
query → const _$StripePurchaseQuery
Query for StripePurchase.