PayXpert - User documentation

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

Introduction

This document lists all the PayXpress v4 features available from an Android Intent call.

The following features are available:

  • Debit transaction

  • Cancellation transaction

  • Refund transaction

  • Deferred debit transaction

  • Printing the last saved ticket (client & merchant)

Requirements:

  • The PayXpress v4 app must be installed.

  • It is possible to call PayXpress with our parameters only via Intent calls.

Calling PayXpress from another Android application

To call PayXpress, you should use an Intent with a Component.

The package should be com.payxpert.merchant and the class com.payxpert.merchant.ui.transaction.TransactionActivity.

There are 2 possible actions for this Intent:

  • Perform a transaction

  • Ticket printing

Here is an example for an Intent starting a transaction:

val intent = Intent()
intent.component = ComponentName("com.payxpert.merchant", 
"com.payxpert.merchant.ui.transaction.TransactionActivity ")
intent.putExtra("transaction_bundle_key_action", "PERFORM")
//TODO add more extras to specify your needs. See next sections

Parameter

Description

Format

Type

Mandatory

transaction_bundle_key_action

The action you want to perform in PayXpress

PERFORM: Start a transaction

PRINT_LAST: Print a ticket

String

Yes

You should go to the next section to know which extras you should add depending on the action.

Transactions

To trigger a transaction in PayXpress, you should pass to the Intent some extra parameters with the description of the transaction you want to do.

intent.putExtra("transaction_bundle_key_amount", 1500)
intent.putExtra("transaction_bundle_key_transaction_type", 1)
intent.putExtra("transaction_bundle_key_print_ticket", false)
intent.putExtra("transaction_bundle_key_reference", "test")

Parameter

Description

Format

Type

Mandatory

transaction_bundle_key_amount

Amount of the transaction.

100: 1,00 €

1050: 10,50 €

Integer

Yes

transaction_bundle_key_transaction_type

Type of the transaction.

1: Debit

2: Cancellation

3: Refund

4: Deferred debit

Integer

No

transaction_bundle_key_print_ticket

Decide if the ticket should be printed or not

true: The ticket should be printed

false: The ticket should not be printed

Boolean

No

transaction_bundle_key_reference

Your id for the transaction

String

Yes

Ticket printing

You can print merchant or client tickets of the last performed transaction.

intent.putExtra("transaction_bundle_key_type_print_ticket", 0)

Parameter

Description

Format

Type

Mandatory

transaction_bundle_key_type_print_ticket

Defines which ticket you want to print

0: Merchant & client ticket

1: Client ticket only

2: Merchant ticket only

Integer

Yes

Retrieve intent’s result

For a transaction

When a transaction is triggered via Intent, it is possible to wait for the transaction result to know the outcome of it.

The result is a JSON that is formatted as a String. It can be found in the extras under the name result. Inside you will find a IntentTransactionOutcome object with the following parameters:

Parameter

Description

Format

Type

Mandatory

status

Outcome of the transaction

0: Accepted

1: Denied

Integer

Yes

transaction

Transaction’s infos

See table below

Transaction

No

The Transaction object can have several parameters:

Parameter

Description

Format

Type

Mandatory

transactionId

Id of the transaction

/

String

Yes

transactionType

Type of the transaction

1: Debit

2: Cancellation

3: Refund

4: Deferred debit

Integer

Yes

externalReference

Reference of the transaction

/

String

No

amount

Amount of the transaction

100: 1,00 €

1050: 10,50 €

Integer

Yes

currency

Currency of the transaction

/

String

Yes

paymentMethod

Type of transaction

0: Contact

1: Contactless

Integer

Yes

tickets

Client & merchant tickets

Json description

String

No

resultCode

Outcome of the transaction

0: Accepted

1: Denied

2: Invalid parameters

3: Transaction already in progress

4: Application in background

5: Error

6: Reference already exists

7: Cancelled

8: Non finished

9: Timeout

Yes

aid

Selected AID during the transaction

/

String

No

isDegradedMode

Transaction without network

true: Transaction without network

false: Transaction with network

Boolean

No

maskedPan

Masked PAN of the card

/

String

No

cardLabel

Type of card

/

String

No

date

Date’s timestamp

171017239300

Long

Yes

amountTips

Amount of the tips

100: 1,00 €

1050: 10,50 €

Integer

Yes

expirationDate

Expiration date of the card

250630

Integer

Yes

panType

Type of PAN

0: Full PAN

1: Partial PAN

2: Token

Integer

Yes

numAuthorization

Authorization number

/

String

No

For a print

When the instruction to print a ticket is triggered via Intent, it is possible to wait for the result to know the outcome of it.

The result is a JSON that is formatted as a String. It can be found in the extras under the name result. Inside you will find a IntentTransactionOutcome object with the following parameters:

Parameter

Description

Format

Type

Mandatory

status

Outcome of the print

0: Printing is successful

1: Printing has failed

Integer

Yes


  • No labels