1.2 How to use the library

Assign the following variables with their corresponding values as shown below:

        String live             = "0";
        String vid              = "demo";
        String cbk              = "http://example.com/cbk.php";
        String security_key     = "demo";
        String amount           = "100";
        String phone_number     = "0710000000";
        String email            = "example@gmail.com";

     

Instantiate a Channels fragment and use it to pass the above parameters to your library in order to load the iPay Payment Interface.


        FragmentManager fragmentManager = getSupportFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        Channel fragment1 = new Channel();
        Bundle data = new Bundle();
        data.putString("live", live);
        data.putString("vid", vid);
        data.putString("cbk", cbk);
        data.putString("key", security_key);
        data.putString("amount", amount);
        data.putString("phone", phone_number);
        data.putString("email", email);
        fragment1.setArguments(data);
        fragmentTransaction.add(R.id.main_content_content, fragment1, "fragment");
        fragmentTransaction.commit();

    
finally import the following:
        import com.libs.ipay.ipayLibrary.Channel;