Class TransactionLinkRequest


public class TransactionLinkRequest extends BaseTransactionRequest
Represents a request for initiating a transaction using the LINK API in the MyPVit SDK.

This class extends BaseTransactionRequest to inherit common transaction fields while adding fields specific to LINK transactions, such as redirection URLs for success and failure scenarios.

Key Features:
  • Inherits all fields and functionalities of BaseTransactionRequest.
  • Adds fields for managing redirection URLs upon transaction success or failure.
  • Supports builder pattern for object creation through SuperBuilder.
Usage: This class is specifically designed for requests sent to the LINK API endpoint of MyPVit. Use the builder pattern to create instances of this class and populate the required fields. Example:
 TransactionLinkRequest request = TransactionLinkRequest.builder()
     .agent("AGENT-1")
     .amount(100.0)
     .product("PRODUCT_TEST")
     .reference("REF123456")
     .customerAccountNumber("123456789")
     .service("RESTLINK")
     .callbackUrlCode("GIGMY")
     .merchantOperationAccountCode("ACC_6718284F467E6")
     .transactionType("PAYMENT")
     .ownerCharge("CUSTOMER")
     .ownerChargeOperator("MERCHANT")
     .freeInfo("Some additional info")
     .failedRedirectionUrlCode("CBFOU")
     .successRedirectionUrlCode("6YRHJ")
     .build();

 String json = request.toJson();
 System.out.println(json);
 
  • Constructor Details

    • TransactionLinkRequest

      public TransactionLinkRequest()
      Default constructor