All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zw.co.paynow.responses.MobileInitResponse Maven / Gradle / Ivy

Go to download

This project contains libraries to interface with Zimbabwe's Leading Payments Gateway, Paynow REST API.

There is a newer version: 1.1.2
Show newest version
package zw.co.paynow.responses;

import zw.co.paynow.exceptions.InvalidIntegrationException;

import java.util.Map;

public class MobileInitResponse extends InitResponse {

    /**
     * The transaction’s reference from Paynow, which is unique to the transaction at Paynow.
     */
    private final String paynowReference;

    /**
     * The instructions to show to the customer how to complete the payment using mobile money.
     */
    protected final String instructions;

    /**
     * MobileInitResponse constructor.
     * 
* Read through the raw response content received from Paynow, and set response values * * @param response Raw response content received from Paynow * @throws InvalidIntegrationException Thrown if Paynow reports that user used an invalid integration */ public MobileInitResponse(Map response) throws InvalidIntegrationException { super(response); if (rawResponseContent.containsKey("instructions")) { instructions = rawResponseContent.get("instructions"); } else { instructions = ""; } if (rawResponseContent.containsKey("paynowreference")) { paynowReference = rawResponseContent.get("paynowreference"); } else { paynowReference = ""; } } public String getPaynowReference() { return paynowReference; } public String getInstructions() { return instructions; } public String instructions() { return getInstructions(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy