SwishPaymentRequest class
Swish Payment Request
A transaction sent from a merchant to the Swish system to initiate an payment.
Constructors
- SwishPaymentRequest({required int statusCode, String? id, String? location, String? payeePaymentReference, String? paymentReference, String? callbackUrl, String? payerAlias, String? payeeAlias, double? amount, String? currency, String? message, String? status, String? dateCreated, String? datePaid, String? errorCode, String? errorMessage})
-
Create a SwishPaymentRequest instance
const
- SwishPaymentRequest.fromError({required int statusCode, required String errorCode, required String errorMessage})
-
Create an instance of SwishPaymentRequest when something went
wrong. Will set everything to null except
statusCode
,errorCode
,errorMessage
andstatus
.factory -
SwishPaymentRequest.fromJson({required Map<
String, dynamic> json, required int statusCode, required String? location}) -
Create an instance of SwishPaymentRequest from a JSON object.
factory
Properties
- amount → double?
-
The amount of money to pay. The amount cannot be less than 0.01
SEK and not more than 999999999999.99 SEK. Valid value has to
be all digits or with 2 digit decimal separated with a period.
final
- callbackUrl → String?
-
URL that Swish will use to notify caller about the outcome of
the Payment request. The URL has to use HTTPS.
final
- currency → String?
-
The currency to use. Currently the only supported value is SEK.
final
- dateCreated → String?
-
The Creation date of the payment request. This will be the date
and time Swish received the payment request.
final
- datePaid → String?
-
The exact time the payment request got paid.
final
- errorCode → String?
-
The error code received by Swish.
final
- errorMessage → String?
-
Additional information regarding any potential errors received
from Swish while handling the payment request.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
Payment request ID.
final
- location → String?
-
An URL for retrieving the payment request.
final
- message → String?
-
Merchant supplied message about the payment/order. Max 50
characters. Allowed characters are the letters a-ö, A-Ö, the
numbers 0-9 and any of the special characters :;.,?!()-”.
final
- payeeAlias → String?
-
The Swish number of the payee. It needs to match with Merchant
Swish number.
final
- payeePaymentReference → String?
-
Payment reference of the payee, wich is the merchant that receives
the payment. This reference could be order id or similar. Allowed
characters are a-z A-Z 0-9 -_.+*/ and lenght must be between 1
and 35 characters.
final
- payerAlias → String?
-
The registered cellphone number of the person that makes the
payment. It can only contain numbers and has to be at least
8 and at most 15 numbers. It also needs to match the following
format in order to be found in Swish: country code + cellphone
number (without leading zero). E.g. 46712345678
final
- paymentReference → String?
-
Payment reference, from the bank, of the payment that occurred
based on the Payment request. Only available if status is PAID.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → String?
-
The status of the payment request.
final
- statusCode → int
-
The status code of the payment request. This will contain
information about the status of the communication with Swish.
It follows basic http status codes.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited