menu

Customer Class

All gateways require customer details to process transactions. All gateways integrated in J2Pay required Customer class object to execute purchase transaction. Below is the code sample of how to use Customer class.


    Customer customer = new Customer();
        
    customer
        .setFirstName("test first name")
        .setLastName("test last name")
        .setCountry(Country.US)
        .setState("TX")
        .setCity("test city")
        .setAddress("test address")
        .setZip("12345")
        .setPhoneNumber("1234567890")
        .setEmail("email@domain.com")
        .setIp("127.0.0.1");