Skip to main content

Bank Listing Request

Run the Bank Listing request first to retrieve the list of available banks. The response provides FICode and AcqBank values used in the Payment request.

Step 1 : Library

The merchant must include the PayMaster Merchant Plug-In (MPI) Java library, PayMaster.jar, in the merchant application.

Step 2 : Import

For Bank Listing, the merchant should import the following into their code:

  • com.PayMaster.Entities.PayMasterEntity
  • com.PayMaster.MessageRequestBuilder.PaymentRequestMessageBuilder
  • com.PayMaster.MessageResponseBuilder.PaymentResponseMessageBuilder
  • com.PayMaster.PropertiesReader.PropertiesReader

Step 3 : Source Code

import com.PayMaster.Entities.PayMasterEntity;
import com.PayMaster.MessageRequestBuilder.PaymentRequestMessageBuilder;
import com.PayMaster.MessageResponseBuilder.PaymentResponseMessageBuilder;
import com.PayMaster.PropertiesReader.PropertiesReader;

// Declare variable for PayMaster Properties - 1st Parameter = File Path, 2nd Parameter = File name
PropertiesReader propertiesReader = new PropertiesReader("./PayMasterProperties/", "BankListing.properties");

// Declare variable for PayMaster Entity
PayMasterEntity paymentRequestEntity = new PayMasterEntity();

// Get all the parameter values from the user side and set into PayMaster Entity
paymentRequestEntity.setter("MerchantID", "000010000099939");
paymentRequestEntity.setter("PaymentID", "B01");
paymentRequestEntity.setter("MerchRefNo", "MYB2023030315435025LL");
paymentRequestEntity.setter("CurrCode", "458");
paymentRequestEntity.setter("FICode", "RPP");
paymentRequestEntity.setter("CountryCode", "MY");

// Call PaymentRequestMessageBuilder to generate the message
PaymentRequestMessageBuilder messageBuilder = new PaymentRequestMessageBuilder();
String paymentMessage = messageBuilder.buildPaymentRequestMessage(paymentRequestEntity, propertiesReader);

// Redirect the message generated to PayMaster Gateway for settlement
response.sendRedirect("https://xxx.finexusgroup.com/upp/faces/banklisting.xhtml?" + paymentMessage);

Step 4 : Indicate PayMaster Properties File Location

The merchant must specify the location of the PayMaster Properties File using PropertiesReader.

Step 5 : Assign Values to the Payment Request Entity

The merchant must assign values to the PayMaster Request Entity using the setter function: setter(parameter name, parameter value).

Step 6 : Generate the Payment Message

Once all mandatory values are assigned, call the PaymentRequestMessageBuilder to generate the Bank Listing message (paymentMessage).

Step 7 : Send the Payment Message to the PayMaster Gateway

The paymentMessage will be sent to the PayMaster Gateway for the Bank Listing function.

Refer to Payment Response for security controls supported by PayMaster Merchant Plug-In (MPI).