PaymentRequest class
Full payment request payload.
Constructors
-
PaymentRequest.addCard({required List<
OrderDetails> orderDetails, required CustomerDetails customerDetails, required BillingDetails billingDetails, ShippingDetails shippingDetails = const ShippingDetails(), Urls? urls, List parameters = const [], List<Map< customData = const [], PaymentViewType viewType = PaymentViewType.bottomsheet})String, dynamic> > -
Add-card: omits
amount,convenience_fee, andquantityfrom JSON, while still allowing Urls and request-level paymentToken when provided.const - PaymentRequest.deriveForAddCard(PaymentRequest submitOrderRequest)
-
Builds an add-card request from a submit-order request (same customer/shipping, minimal order line).
factory
-
PaymentRequest.submitOrder({String? paymentToken, required List<
OrderDetails> orderDetails, required CustomerDetails customerDetails, required BillingDetails billingDetails, ShippingDetails shippingDetails = const ShippingDetails(), Urls? urls, List parameters = const [], List<Map< customData = const [], String action = 'AUTH', PaymentViewType viewType = PaymentViewType.bottomsheet})String, dynamic> > -
Checkout: includes order amounts, callback Urls, and optional
toSaveCards. Request-levelpaymentTokenis optional; when null or empty it is omitted from toJson card details.const
Properties
- action → String
-
final
- billingDetails → BillingDetails
-
final
-
customData
→ List<
Map< String, dynamic> > -
final
- customerDetails → CustomerDetails
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSdkPaymentCardPayload → bool
-
Whether cardDataForSdkPayment includes a PAN or payment token.
no setter
- kind → PaymentRequestType
-
final
-
orderDetails
→ List<
OrderDetails> -
final
- parameters → List
-
final
- paymentToken → String?
-
Request-level token for
/sdk/payment. Alwaysnullfor PaymentRequestType.addCard.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shippingDetails → ShippingDetails
-
final
- urls → Urls?
-
Present only for PaymentRequestType.submitOrder.
final
- viewType → PaymentViewType
-
When true, the user can save the card for future use. Always
falsefor add-card. Whether to show the payment gateway as a PaymentViewType.bottomsheet or full PaymentViewType.screen.final
Methods
-
cardDataForSdkPayment(
) → CardData -
Builds CardData for
POST .../sdk/paymentfrom paymentToken and any card-like keys in parameters / customData maps (e.g.payment_token,m_payment_token,card_number,cvv,expiry). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
CardData card) → Map< String, dynamic> -
JSON body for PayOrc
POST .../sdk/payment({ "data": { ... } }). -
toString(
) → String -
A string representation of this object.
inherited
-
toTabbyInitJson(
) → Map< String, dynamic> -
JSON body for PayOrc
POST .../sdk/tabby/init({ "data": { ... } }).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited