Class: OpenTransaction
Represents an open transaction.
Constructors
constructor
• new OpenTransaction(options
)
Constructs a new OpenTransaction instance.
Parameters
Name | Type | Description |
---|---|---|
options | TransactionOptions | The transaction options. |
Defined in
src/transaction/open-transaction/open-transaction.ts:38
Properties
merchantCode
• Private
merchantCode: string
The merchant code for identification.
Defined in
src/transaction/open-transaction/open-transaction.ts:31
privateKey
• Private
privateKey: string
The private key for authentication.
Defined in
src/transaction/open-transaction/open-transaction.ts:26
request
• Private
request: HTTPRequest
HTTP Request
Defined in
src/transaction/open-transaction/open-transaction.ts:21
Methods
create
▸ create(params
): Promise
<IOpenTransaction
>
Creating a new transaction or generating a payment code for Open Payment type.
Throws
Throws an error if failed to create the transaction.
See
Parameters
Name | Type | Description |
---|---|---|
params | IOpenPaymentParams | The payment parameters. |
Returns
Promise
<IOpenTransaction
>
A promise that resolves to the created transaction.
Defined in
src/transaction/open-transaction/open-transaction.ts:55
detail
▸ detail(uuid
): Promise
<IOpenTransaction
>
Fetching the details of the previously made open payment transaction.
Throws
Throws an error if failed to retrieve the transaction.
See
Parameters
Name | Type | Description |
---|---|---|
uuid | string | The UUID of the transaction. |
Returns
Promise
<IOpenTransaction
>
A promise that resolves to the transaction details.
Defined in
src/transaction/open-transaction/open-transaction.ts:85
formatDateTime
▸ Private
formatDateTime(date
): string
Formats a date and time to a string in the format "YYYY-MM-DD HH:mm:ss".
Parameters
Name | Type | Description |
---|---|---|
date | Date | The date to format. |
Returns
string
The formatted date and time string.
Defined in
src/transaction/open-transaction/open-transaction.ts:136
list
▸ list(uuid
, params?
): Promise
<IOpenTransactionLists
>
Retrieving a list of incoming payments for open payment.
Throws
Throws an error if failed to list the transactions.
See
Open Transactions List - Tripay
Parameters
Name | Type | Description |
---|---|---|
uuid | string | The UUID of the payment. |
params? | IOpenPaymentListParams | The list parameters. |
Returns
Promise
<IOpenTransactionLists
>
A promise that resolves to the list of transactions.