├── docs ├── package-list ├── com │ └── yaphet │ │ └── chapa │ │ ├── package-frame.html │ │ ├── exception │ │ ├── package-frame.html │ │ ├── package-tree.html │ │ └── package-summary.html │ │ ├── utility │ │ ├── package-frame.html │ │ ├── package-tree.html │ │ └── package-summary.html │ │ ├── client │ │ ├── package-frame.html │ │ ├── package-tree.html │ │ └── package-summary.html │ │ ├── model │ │ ├── package-frame.html │ │ ├── package-tree.html │ │ └── package-summary.html │ │ ├── package-tree.html │ │ └── package-summary.html ├── script.js ├── overview-frame.html ├── allclasses-noframe.html ├── index.html ├── allclasses-frame.html ├── deprecated-list.html ├── constant-values.html ├── serialized-form.html ├── overview-summary.html └── index-files │ ├── index-5.html │ ├── index-10.html │ ├── index-1.html │ ├── index-14.html │ ├── index-9.html │ ├── index-2.html │ ├── index-12.html │ ├── index-4.html │ ├── index-8.html │ ├── index-11.html │ ├── index-15.html │ └── index-7.html ├── src ├── main │ └── java │ │ └── com │ │ └── yaphet │ │ └── chapa │ │ ├── model │ │ ├── SplitType.java │ │ ├── Customization.java │ │ ├── Bank.java │ │ ├── SubAccountResponseData.java │ │ ├── ResponseData.java │ │ ├── InitializeResponseData.java │ │ ├── SubAccount.java │ │ ├── PostData.java │ │ └── VerifyResponseData.java │ │ ├── exception │ │ └── ChapaException.java │ │ ├── client │ │ ├── ChapaClient.java │ │ └── ChapaClientImpl.java │ │ └── utility │ │ ├── LocalDateTimeDeserializer.java │ │ └── Util.java └── test │ └── java │ └── com │ └── yaphet │ └── chapa │ └── UtilTest.java ├── .gitignore ├── .github └── workflows │ ├── maven.yml │ └── maven-publish.yml ├── README.md └── pom.xml /docs/package-list: -------------------------------------------------------------------------------- 1 | com.yaphet.chapa 2 | com.yaphet.chapa.client 3 | com.yaphet.chapa.exception 4 | com.yaphet.chapa.model 5 | com.yaphet.chapa.utility 6 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/SplitType.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | public enum SplitType { 4 | PERCENTAGE, 5 | FLAT 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/exception/ChapaException.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.exception; 2 | 3 | /** 4 | * A ChapaException is thrown to signal a problem during SDK execution. 5 | */ 6 | public class ChapaException extends Exception { 7 | 8 | public ChapaException(String message) { 9 | super(message); 10 | } 11 | 12 | public ChapaException(Throwable cause) { 13 | super(cause); 14 | } 15 | 16 | public ChapaException(String message, Throwable cause) { 17 | super(message, cause); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | pom.xml.versionsBackup 3 | target/ 4 | logs/ 5 | !.mvn/wrapper/maven-wrapper.jar 6 | !**/src/main/**/target/ 7 | !**/src/test/**/target/ 8 | 9 | ### STS ### 10 | .apt_generated 11 | .classpath 12 | .factorypath 13 | .project 14 | .settings 15 | .springBeans 16 | .sts4-cache 17 | .env 18 | 19 | ### IntelliJ IDEA ### 20 | .idea 21 | *.iws 22 | *.iml 23 | *.ipr 24 | 25 | ### NetBeans ### 26 | /nbproject/private/ 27 | /nbbuild/ 28 | /dist/ 29 | /nbdist/ 30 | /.nb-gradle/ 31 | build/ 32 | !**/src/main/**/build/ 33 | !**/src/test/**/build/ 34 | 35 | ### VS Code ### 36 | .vscode/ 37 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/client/ChapaClient.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.client; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | *

A client to interact with Chapa API.


7 | * 8 | * Implement this interface to create your own client or use the default implementation {@link ChapaClientImpl}. 9 | */ 10 | public interface ChapaClient { 11 | 12 | 13 | String post(String url, Map fields, String secreteKey) throws Throwable; 14 | 15 | String post(String url, String body, String secreteKey) throws Throwable; 16 | 17 | String get(String url, String secreteKey) throws Throwable; 18 | 19 | int getStatusCode(); 20 | } 21 | -------------------------------------------------------------------------------- /src/test/java/com/yaphet/chapa/UtilTest.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa; 2 | 3 | import com.yaphet.chapa.model.Customization; 4 | import org.junit.jupiter.api.BeforeEach; 5 | import org.junit.jupiter.api.Disabled; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | @Disabled 11 | class UtilTest { 12 | private final Map customizations = new HashMap<>(); 13 | private final Customization customization = new Customization(); 14 | 15 | @BeforeEach 16 | public void setUp() { 17 | customization.setTitle("E-commerce"); 18 | customization.setDescription("It is time to pay"); 19 | customization.setLogo("https://mylogo.com/log.png"); 20 | } 21 | } -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | name: Java CI with Maven 2 | 3 | on: push 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v3 12 | - name: Set up JDK 8 13 | uses: actions/setup-java@v3 14 | with: 15 | java-version: '8' 16 | distribution: 'temurin' 17 | cache: maven 18 | - name: Build with Maven 19 | run: mvn -B package --file pom.xml 20 | # - name: Lint Code Base 21 | # uses: github/super-linter@v4 22 | # env: 23 | # VALIDATE_ALL_CODEBASE: false 24 | # DEFAULT_BRANCH: main 25 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 26 | - uses: actions/upload-artifact@v2 27 | if: failure() 28 | with: 29 | name: build-reports 30 | path: | 31 | target 32 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/Customization.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | public class Customization { 4 | 5 | private String title; 6 | private String description; 7 | private String logo; 8 | 9 | public String getTitle() { 10 | return title; 11 | } 12 | 13 | public Customization setTitle(String title) { 14 | this.title = title; 15 | return this; 16 | } 17 | 18 | public String getDescription() { 19 | return description; 20 | } 21 | 22 | public Customization setDescription(String description) { 23 | this.description = description; 24 | return this; 25 | } 26 | 27 | public String getLogo() { 28 | return logo; 29 | } 30 | 31 | public Customization setLogo(String logo) { 32 | this.logo = logo; 33 | return this; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa 7 | 8 | 9 | 10 | 11 | 12 |

com.yaphet.chapa

13 |
14 |

Classes

15 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/exception/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.exception 7 | 8 | 9 | 10 | 11 | 12 |

com.yaphet.chapa.exception

13 |
14 |

Exceptions

15 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/utility/LocalDateTimeDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.utility; 2 | 3 | import com.google.gson.JsonDeserializationContext; 4 | import com.google.gson.JsonDeserializer; 5 | import com.google.gson.JsonElement; 6 | import com.google.gson.JsonParseException; 7 | 8 | import java.lang.reflect.Type; 9 | import java.time.LocalDateTime; 10 | import java.time.format.DateTimeFormatter; 11 | 12 | /** 13 | * Custom deserializer for LocalDateTime objects. 14 | */ 15 | public class LocalDateTimeDeserializer implements JsonDeserializer { 16 | 17 | @Override 18 | public LocalDateTime deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { 19 | String dateTimeString = json.getAsString(); 20 | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"); 21 | LocalDateTime dateTime = LocalDateTime.parse(dateTimeString, formatter); 22 | return dateTime; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.github/workflows/maven-publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish to Maven Central 2 | on: 3 | push: 4 | branches: 5 | - main 6 | paths: 7 | - 'docs/**' 8 | - 'src/**' 9 | - 'pom.xml' 10 | workflow_dispatch: 11 | 12 | 13 | jobs: 14 | publish: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Set up Maven Central Repository 20 | uses: actions/setup-java@v3 21 | with: 22 | java-version: '8' 23 | distribution: 'temurin' 24 | server-id: ossrh 25 | server-username: MAVEN_USERNAME 26 | server-password: MAVEN_PASSWORD 27 | gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} 28 | gpg-passphrase: MAVEN_GPG_PASSPHRASE 29 | - name: Publish package 30 | run: mvn --batch-mode deploy 31 | env: 32 | MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} 33 | MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} 34 | MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/utility/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.utility 7 | 8 | 9 | 10 | 11 | 12 |

com.yaphet.chapa.utility

13 |
14 |

Classes

15 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/client/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.client 7 | 8 | 9 | 10 | 11 | 12 |

com.yaphet.chapa.client

13 |
14 |

Interfaces

15 | 18 |

Classes

19 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Overview List 7 | 8 | 9 | 10 | 11 | 12 | 13 | 23 |

 

24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/Bank.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | public class Bank { 6 | 7 | private String id; 8 | private String name; 9 | @SerializedName("country_id") 10 | private int countryId; 11 | @SerializedName("created_at") 12 | private String createdAt; 13 | @SerializedName("updated_at") 14 | private String updatedAt; 15 | 16 | public String getId() { 17 | return id; 18 | } 19 | 20 | public Bank setId(String id) { 21 | this.id = id; 22 | return this; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public Bank setName(String name) { 30 | this.name = name; 31 | return this; 32 | } 33 | 34 | public int getCountryId() { 35 | return countryId; 36 | } 37 | 38 | public Bank setCountryId(int countryId) { 39 | this.countryId = countryId; 40 | return this; 41 | } 42 | 43 | public String getCreatedAt() { 44 | return createdAt; 45 | } 46 | 47 | public Bank setCreatedAt(String createdAt) { 48 | this.createdAt = createdAt; 49 | return this; 50 | } 51 | 52 | public String getUpdatedAt() { 53 | return updatedAt; 54 | } 55 | 56 | public Bank setUpdatedAt(String updatedAt) { 57 | this.updatedAt = updatedAt; 58 | return this; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/SubAccountResponseData.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | public class SubAccountResponseData extends ResponseData { 6 | 7 | private Data data; 8 | 9 | public SubAccountResponseData() { 10 | } 11 | 12 | public SubAccountResponseData(String rawJson, String message, String status, int statusCode, Data data) { 13 | super(rawJson, message, status, statusCode); 14 | this.data = data; 15 | } 16 | 17 | public SubAccountResponseData setMessage(String message) { 18 | return (SubAccountResponseData) super.setMessage(message); 19 | } 20 | 21 | public SubAccountResponseData setStatus(String status) { 22 | return (SubAccountResponseData) super.setStatus(status); 23 | } 24 | 25 | public SubAccountResponseData setStatusCode(int statusCode) { 26 | return (SubAccountResponseData) super.setStatusCode(statusCode); 27 | } 28 | 29 | public SubAccountResponseData setRawJson(String rawJson) { 30 | return (SubAccountResponseData) super.setRawJson(rawJson); 31 | } 32 | 33 | public SubAccountResponseData setData(Data data) { 34 | this.data = data; 35 | return this; 36 | } 37 | 38 | public Data getData() { 39 | return data; 40 | } 41 | 42 | public static class Data { 43 | @SerializedName("subaccounts[id]") 44 | private String subAccountId; 45 | 46 | public String getSubAccountId() { 47 | return subAccountId; 48 | } 49 | 50 | public Data setSubAccountId(String subAccountId) { 51 | this.subAccountId = subAccountId; 52 | return this; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/ResponseData.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | /** 4 | * The ResponseData class is an abstract class that 5 | * represents the response data from Chapa API. 6 | */ 7 | public abstract class ResponseData { 8 | 9 | private String message; 10 | private String status; 11 | private int statusCode; 12 | private String rawJson; 13 | 14 | public ResponseData() { 15 | } 16 | 17 | public ResponseData(String rawJson, String message, String status, int statusCode) { 18 | this.message = message; 19 | this.status = status; 20 | this.statusCode = statusCode; 21 | this.rawJson = rawJson; 22 | } 23 | 24 | public String getMessage() { 25 | return message; 26 | } 27 | 28 | public ResponseData setMessage(String message) { 29 | this.message = message; 30 | return this; 31 | } 32 | 33 | public String getStatus() { 34 | return status; 35 | } 36 | 37 | public ResponseData setStatus(String status) { 38 | this.status = status; 39 | return this; 40 | } 41 | 42 | public int getStatusCode() { 43 | return statusCode; 44 | } 45 | 46 | public ResponseData setStatusCode(int statusCode) { 47 | this.statusCode = statusCode; 48 | return this; 49 | } 50 | 51 | public String getRawJson() { 52 | return rawJson; 53 | } 54 | 55 | /** 56 | * An alias for {@link #getRawJson()}. 57 | * @return String representation of the response JSON data. 58 | */ 59 | public String asString() { 60 | return rawJson; 61 | } 62 | 63 | public ResponseData setRawJson(String rawJson) { 64 | this.rawJson = rawJson; 65 | return this; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/InitializeResponseData.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | public class InitializeResponseData extends ResponseData { 6 | 7 | private Data data; 8 | 9 | public InitializeResponseData() { 10 | } 11 | 12 | public InitializeResponseData(String rawJson, String message, String status, int statusCode, Data data) { 13 | super(rawJson, message, status, statusCode); 14 | this.data = data; 15 | } 16 | 17 | public InitializeResponseData setMessage(String message) { 18 | return (InitializeResponseData) super.setMessage(message); 19 | } 20 | 21 | public InitializeResponseData setStatus(String status) { 22 | return (InitializeResponseData) super.setStatus(status); 23 | } 24 | 25 | public InitializeResponseData setStatusCode(int statusCode) { 26 | return (InitializeResponseData) super.setStatusCode(statusCode); 27 | } 28 | 29 | public InitializeResponseData setRawJson(String rawJson) { 30 | return (InitializeResponseData) super.setRawJson(rawJson); 31 | } 32 | 33 | public InitializeResponseData setData(Data data) { 34 | this.data = data; 35 | return this; 36 | } 37 | 38 | public Data getData() { 39 | return data; 40 | } 41 | 42 | public static class Data { 43 | @SerializedName("checkout_url") 44 | private String checkOutUrl; 45 | 46 | public String getCheckOutUrl() { 47 | return checkOutUrl; 48 | } 49 | 50 | public InitializeResponseData.Data setCheckOutUrl(String checkOutUrl) { 51 | this.checkOutUrl = checkOutUrl; 52 | return this; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/SubAccount.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | public class SubAccount { 6 | 7 | @SerializedName("business_name") 8 | private String businessName; 9 | @SerializedName("bank_code") 10 | private String bankCode; 11 | @SerializedName("account_name") 12 | private String accountName; 13 | @SerializedName("account_number") 14 | private String accountNumber; 15 | @SerializedName("split_type") 16 | private SplitType splitType; 17 | @SerializedName("split_value") 18 | private Double splitValue; 19 | 20 | public String getBusinessName() { 21 | return businessName; 22 | } 23 | 24 | public SubAccount setBusinessName(String businessName) { 25 | this.businessName = businessName; 26 | return this; 27 | } 28 | 29 | public String getBankCode() { 30 | return bankCode; 31 | } 32 | 33 | public SubAccount setBankCode(String bankCode) { 34 | this.bankCode = bankCode; 35 | return this; 36 | } 37 | 38 | public String getAccountName() { 39 | return accountName; 40 | } 41 | 42 | public SubAccount setAccountName(String accountName) { 43 | this.accountName = accountName; 44 | return this; 45 | } 46 | 47 | public String getAccountNumber() { 48 | return accountNumber; 49 | } 50 | 51 | public SubAccount setAccountNumber(String accountNumber) { 52 | this.accountNumber = accountNumber; 53 | return this; 54 | } 55 | 56 | public SplitType getSplitType() { 57 | return splitType; 58 | } 59 | 60 | public SubAccount setSplitType(SplitType splitType) { 61 | this.splitType = splitType; 62 | return this; 63 | } 64 | 65 | public Double getSplitValue() { 66 | return splitValue; 67 | } 68 | 69 | public SubAccount setSplitValue(Double splitValue) { 70 | this.splitValue = splitValue; 71 | return this; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/model/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.model 7 | 8 | 9 | 10 | 11 | 12 |

com.yaphet.chapa.model

13 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/client/ChapaClientImpl.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.client; 2 | 3 | import java.util.Map; 4 | 5 | import com.mashape.unirest.http.HttpResponse; 6 | import com.mashape.unirest.http.JsonNode; 7 | import org.apache.http.HttpHeaders; 8 | 9 | import com.mashape.unirest.http.Unirest; 10 | import com.mashape.unirest.request.body.MultipartBody; 11 | import com.mashape.unirest.request.body.RequestBodyEntity; 12 | 13 | /** 14 | *

A default implementation of {@link ChapaClient}.


15 | * 16 | *

Uses Unirest to make HTTP requests.

17 | * 18 | * @see Unirest 19 | */ 20 | public class ChapaClientImpl implements ChapaClient { 21 | 22 | private static final String authorizationHeader = HttpHeaders.AUTHORIZATION; 23 | private static final String acceptEncodingHeader = HttpHeaders.ACCEPT_ENCODING; 24 | 25 | private int statusCode; 26 | 27 | @Override 28 | public String post(String url, Map fields, String secreteKey) throws Throwable { 29 | MultipartBody request = Unirest.post(url) 30 | .header(acceptEncodingHeader, "application/json") 31 | .header(authorizationHeader, "Bearer " + secreteKey) 32 | .fields(fields); 33 | 34 | HttpResponse jsonNodeHttpResponse = request.asJson(); 35 | 36 | statusCode = jsonNodeHttpResponse.getStatus(); 37 | return jsonNodeHttpResponse.getBody().toString(); 38 | } 39 | 40 | @Override 41 | public String post(String url, String body, String secreteKey) throws Throwable { 42 | RequestBodyEntity request = Unirest.post(url) 43 | .header(acceptEncodingHeader, "application/json") 44 | .header(authorizationHeader, "Bearer " + secreteKey) 45 | .body(body); 46 | 47 | HttpResponse jsonNodeHttpResponse = request.asJson(); 48 | 49 | statusCode = jsonNodeHttpResponse.getStatus(); 50 | return jsonNodeHttpResponse.getBody().toString(); 51 | } 52 | 53 | @Override 54 | public String get(String url, String secreteKey) throws Throwable { 55 | HttpResponse httpResponse = Unirest.get(url) 56 | .header(acceptEncodingHeader, "application/json") 57 | .header(authorizationHeader, "Bearer " + secreteKey) 58 | .asJson(); 59 | 60 | statusCode = httpResponse.getStatus(); 61 | return httpResponse.getBody().toString(); 62 | } 63 | 64 | @Override 65 | public int getStatusCode() { 66 | return statusCode; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /docs/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Generated Documentation (Untitled) 7 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | <noscript> 69 | <div>JavaScript is disabled on your browser.</div> 70 | </noscript> 71 | <h2>Frame Alert</h2> 72 | <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/PostData.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | import java.math.BigDecimal; 6 | 7 | /** 8 | * The PostData class is an object representation of JSON form data 9 | * that will be posted to Chapa API. 10 | */ 11 | public class PostData { 12 | 13 | private BigDecimal amount; 14 | private String currency; 15 | private String email; 16 | @SerializedName("first_name") 17 | private String firstName; 18 | @SerializedName("last_name") 19 | private String lastName; 20 | @SerializedName("tx_ref") 21 | private String txRef; 22 | @SerializedName("callback_url") 23 | private String callbackUrl; 24 | @SerializedName("return_url") 25 | private String returnUrl; 26 | @SerializedName("subaccounts[id]") 27 | private String subAccountId; 28 | private Customization customization; 29 | 30 | public BigDecimal getAmount() { 31 | return amount; 32 | } 33 | 34 | public PostData setAmount(BigDecimal amount) { 35 | this.amount = amount; 36 | return this; 37 | } 38 | 39 | public String getCurrency() { 40 | return currency; 41 | } 42 | 43 | public PostData setCurrency(String currency) { 44 | this.currency = currency; 45 | return this; 46 | } 47 | 48 | public String getEmail() { 49 | return email; 50 | } 51 | 52 | public PostData setEmail(String email) { 53 | this.email = email; 54 | return this; 55 | } 56 | 57 | public String getFirstName() { 58 | return firstName; 59 | } 60 | 61 | public PostData setFirstName(String firstName) { 62 | this.firstName = firstName; 63 | return this; 64 | } 65 | 66 | public String getLastName() { 67 | return lastName; 68 | } 69 | 70 | public PostData setLastName(String lastName) { 71 | this.lastName = lastName; 72 | return this; 73 | } 74 | 75 | public String getTxRef() { 76 | return txRef; 77 | } 78 | 79 | public PostData setTxRef(String txRef) { 80 | this.txRef = txRef; 81 | return this; 82 | } 83 | 84 | public String getCallbackUrl() { 85 | return callbackUrl; 86 | } 87 | 88 | public PostData setCallbackUrl(String callbackUrl) { 89 | this.callbackUrl = callbackUrl; 90 | return this; 91 | } 92 | 93 | public String getReturnUrl() { 94 | return returnUrl; 95 | } 96 | 97 | public PostData setReturnUrl(String returnUrl) { 98 | this.returnUrl = returnUrl; 99 | return this; 100 | } 101 | 102 | public String getSubAccountId() { 103 | return subAccountId; 104 | } 105 | 106 | public PostData setSubAccountId(String subAccountId) { 107 | this.subAccountId = subAccountId; 108 | return this; 109 | } 110 | 111 | public Customization getCustomization() { 112 | return customization; 113 | } 114 | 115 | public PostData setCustomization(Customization customization) { 116 | this.customization = customization; 117 | return this; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /docs/deprecated-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Deprecated List 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Deprecated API

73 |

Contents

74 |
75 | 76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 92 |
93 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /docs/constant-values.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Constant Field Values 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Constant Field Values

73 |

Contents

74 |
75 | 76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 92 |
93 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /docs/serialized-form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Serialized Form 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Serialized Form

73 |
74 |
75 | 87 |
88 | 89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 | 105 |
106 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package com.yaphet.chapa

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 |
    81 |
  • java.lang.Object 82 |
      83 |
    • com.yaphet.chapa.Chapa
    • 84 |
    85 |
  • 86 |
87 |
88 | 89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 | 105 |
106 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /docs/overview-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Overview 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 |
Packages 
PackageDescription
com.yaphet.chapa 
com.yaphet.chapa.client 
com.yaphet.chapa.exception 
com.yaphet.chapa.model 
com.yaphet.chapa.utility 
101 |
102 | 103 |
104 | 105 | 106 | 107 | 108 | 109 | 110 | 119 |
120 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/utility/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.utility Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package com.yaphet.chapa.utility

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 |
    81 |
  • java.lang.Object 82 |
      83 |
    • com.yaphet.chapa.utility.LocalDateTimeDeserializer (implements com.google.gson.JsonDeserializer<T>)
    • 84 |
    • com.yaphet.chapa.utility.Util
    • 85 |
    86 |
  • 87 |
88 |
89 | 90 |
91 | 92 | 93 | 94 | 95 | 96 | 97 | 106 |
107 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Package com.yaphet.chapa

73 |
74 |
75 |
    76 |
  • 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 90 | 91 | 92 |
    Class Summary 
    ClassDescription
    Chapa 87 |
    The Chapa class is responsible for making GET and POST request to Chapa API to initialize 88 | a transaction, verify a transaction and create a sub account.
    89 |
    93 |
  • 94 |
95 |
96 | 97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 113 |
114 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/exception/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.exception Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package com.yaphet.chapa.exception

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 |
    81 |
  • java.lang.Object 82 |
      83 |
    • java.lang.Throwable (implements java.io.Serializable) 84 |
        85 |
      • java.lang.Exception 86 | 89 |
      • 90 |
      91 |
    • 92 |
    93 |
  • 94 |
95 |
96 | 97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 113 |
114 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /docs/index-files/index-5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | E-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

E

75 |
76 |
extractBanks(String) - Static method in class com.yaphet.chapa.utility.Util
77 |
 
78 |
79 | A B C D E G I J L N P R S U V 
80 | 81 |
82 | 83 | 84 | 85 | 86 | 87 | 88 | 97 |
98 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /docs/index-files/index-10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | N-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

N

75 |
76 |
notNullAndEmpty(String) - Static method in class com.yaphet.chapa.utility.Util
77 |
 
78 |
79 | A B C D E G I J L N P R S U V 
80 | 81 |
82 | 83 | 84 | 85 | 86 | 87 | 88 | 97 |
98 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/exception/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.exception 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Package com.yaphet.chapa.exception

73 |
74 |
75 |
    76 |
  • 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 89 | 90 | 91 |
    Exception Summary 
    ExceptionDescription
    ChapaException 87 |
    A ChapaException is thrown to signal a problem during SDK execution.
    88 |
    92 |
  • 93 |
94 |
95 | 96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 112 |
113 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /docs/index-files/index-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | A-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

A

75 |
76 |
asString() - Method in class com.yaphet.chapa.model.ResponseData
77 |
78 | 79 |
80 |
81 | A B C D E G I J L N P R S U V 
82 | 83 |
84 | 85 | 86 | 87 | 88 | 89 | 90 | 99 |
100 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/client/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.client Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package com.yaphet.chapa.client

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 |
    81 |
  • java.lang.Object 82 | 85 |
  • 86 |
87 |

Interface Hierarchy

88 | 91 |
92 | 93 |
94 | 95 | 96 | 97 | 98 | 99 | 100 | 109 |
110 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/utility/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.utility 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Package com.yaphet.chapa.utility

73 |
74 |
75 |
    76 |
  • 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 89 | 90 | 91 | 92 | 95 | 96 | 97 |
    Class Summary 
    ClassDescription
    LocalDateTimeDeserializer 87 |
    Custom deserializer for LocalDateTime objects.
    88 |
    Util 93 |
    The Util class serves as a helper class for the main Chapa class.
    94 |
    98 |
  • 99 |
100 |
101 | 102 |
103 | 104 | 105 | 106 | 107 | 108 | 109 | 118 |
119 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/utility/Util.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.utility; 2 | 3 | import java.lang.reflect.Type; 4 | import java.math.BigDecimal; 5 | import java.time.Clock; 6 | import java.time.LocalDateTime; 7 | import java.time.format.DateTimeFormatter; 8 | import java.util.List; 9 | import java.util.Map; 10 | import java.util.UUID; 11 | 12 | import com.google.gson.Gson; 13 | import com.google.gson.JsonObject; 14 | import com.google.gson.reflect.TypeToken; 15 | import com.yaphet.chapa.model.*; 16 | 17 | /** 18 | * The Util class serves as a helper class for the main {@link com.yaphet.chapa.Chapa} class. 19 | */ 20 | public class Util { 21 | 22 | private static final Clock CLOCK = Clock.systemDefaultZone(); 23 | private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("dd-MM-yy-HH-mm-ss"); 24 | private final static Gson JSON_MAPPER = new Gson(); 25 | 26 | /** 27 | * @param jsonData A json string to be mapped to a {@link PostData} object. 28 | * @return A {@link PostData} object which contains post fields of the 29 | * provided JSON data. 30 | */ 31 | public static PostData jsonToPostData(String jsonData) { 32 | if (!notNullAndEmpty(jsonData)) { 33 | throw new IllegalArgumentException("Can't map null or empty json to PostData object"); 34 | } 35 | 36 | Map newMap = jsonToMap(jsonData); 37 | JsonObject jsonObject = JSON_MAPPER.fromJson(jsonData, JsonObject.class); 38 | Type bankListType = new TypeToken>() {}.getType(); 39 | Map customizations = JSON_MAPPER.fromJson(jsonObject.get("customizations"), bankListType); 40 | Customization customization = new Customization() 41 | .setTitle(customizations.get("customization[title]")) 42 | .setTitle(customizations.get("customization[description]")) 43 | .setTitle(customizations.get("customization[logo]")) 44 | ; 45 | return new PostData() 46 | .setAmount(new BigDecimal(String.valueOf(newMap.get("amount")))) 47 | .setCurrency(newMap.get("currency")) 48 | .setEmail(newMap.get("email")) 49 | .setFirstName(newMap.get("first_name")) 50 | .setLastName(newMap.get("last_name")) 51 | .setTxRef(newMap.get("tx_ref")) 52 | .setCallbackUrl(newMap.get("callback_url")) 53 | .setCustomization(customization); 54 | } 55 | 56 | /** 57 | * @param jsonData A json string to be mapped to a {@link SubAccount} object. 58 | * @return A {@link SubAccount} object which contains post fields of the 59 | * provided JSON data. 60 | */ 61 | public static SubAccount jsonToSubAccount(String jsonData) { 62 | if (!notNullAndEmpty(jsonData)) { 63 | throw new IllegalArgumentException("Can't map null or empty json to SubAccount object"); 64 | } 65 | 66 | return JSON_MAPPER.fromJson(jsonData, SubAccount.class); 67 | } 68 | 69 | /** 70 | * @param jsonData a json string to be mapped to a Map object. 71 | * @return A Map object which contains post fields of the provided 72 | * JSON data. 73 | */ 74 | public static Map jsonToMap(String jsonData) { 75 | return JSON_MAPPER.fromJson(jsonData, Map.class); 76 | } 77 | 78 | /** 79 | * @param jsonData a json string to be mapped to an {@link InitializeResponseData} object. 80 | * @return An {@link InitializeResponseData} object which contains response fields of the provided 81 | * JSON data. 82 | */ 83 | public static InitializeResponseData jsonToInitializeResponseData(String jsonData) { 84 | return JSON_MAPPER.fromJson(jsonData, InitializeResponseData.class); 85 | } 86 | 87 | /** 88 | * @param jsonData a json string to be mapped to a {@link VerifyResponseData} object. 89 | * @return A {@link VerifyResponseData} object which contains response fields of the provided 90 | * JSON data. 91 | */ 92 | public static VerifyResponseData jsonToVerifyResponseData(String jsonData) { 93 | return JSON_MAPPER.fromJson(jsonData, VerifyResponseData.class); 94 | } 95 | 96 | /** 97 | * @param jsonData a json string to be mapped to a {@link SubAccountResponseData} object. 98 | * @return A {@link SubAccountResponseData} object which contains response fields of the provided 99 | * JSON data. 100 | */ 101 | public static SubAccountResponseData jsonToSubAccountResponseData(String jsonData) { 102 | return JSON_MAPPER.fromJson(jsonData, SubAccountResponseData.class); 103 | } 104 | 105 | /** 106 | * @param jsonData a json string to be mapped to a list of {@link Bank} objects. 107 | * @return A list of {@link Bank} objects each containing details of a bank. 108 | */ 109 | public static List extractBanks(String jsonData) { 110 | JsonObject jsonObject = JSON_MAPPER.fromJson(jsonData, JsonObject.class); 111 | Type bankListType = new TypeToken>() {}.getType(); 112 | 113 | return JSON_MAPPER.fromJson(jsonObject.get("data"), bankListType); 114 | } 115 | 116 | /** 117 | * @return A random string followed by the current date/time value (dd-MM-yy-HH-mm-ss). 118 | */ 119 | public static String generateToken() { 120 | final LocalDateTime now = LocalDateTime.now(CLOCK); 121 | return UUID.randomUUID().toString().substring(0, 8) + "_" + FORMATTER.format(now); 122 | } 123 | 124 | public static boolean notNullAndEmpty(String value) { 125 | return value != null && !value.isEmpty(); 126 | } 127 | 128 | public static boolean is2xxSuccessful(int statucCode) { 129 | return (statucCode / 100) == 2; 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /docs/index-files/index-14.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | U-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

U

75 |
76 |
Util - Class in com.yaphet.chapa.utility
77 |
78 |
The Util class serves as a helper class for the main Chapa class.
79 |
80 |
Util() - Constructor for class com.yaphet.chapa.utility.Util
81 |
 
82 |
83 | A B C D E G I J L N P R S U V 
84 | 85 |
86 | 87 | 88 | 89 | 90 | 91 | 92 | 101 |
102 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /docs/index-files/index-9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | L-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

L

75 |
76 |
LocalDateTimeDeserializer - Class in com.yaphet.chapa.utility
77 |
78 |
Custom deserializer for LocalDateTime objects.
79 |
80 |
LocalDateTimeDeserializer() - Constructor for class com.yaphet.chapa.utility.LocalDateTimeDeserializer
81 |
 
82 |
83 | A B C D E G I J L N P R S U V 
84 | 85 |
86 | 87 | 88 | 89 | 90 | 91 | 92 | 101 |
102 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /docs/index-files/index-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | B-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

B

75 |
76 |
Bank - Class in com.yaphet.chapa.model
77 |
 
78 |
Bank() - Constructor for class com.yaphet.chapa.model.Bank
79 |
 
80 |
banks() - Method in class com.yaphet.chapa.Chapa
81 |
 
82 |
83 | A B C D E G I J L N P R S U V 
84 | 85 |
86 | 87 | 88 | 89 | 90 | 91 | 92 | 101 |
102 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /docs/index-files/index-12.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

R

75 |
76 |
ResponseData - Class in com.yaphet.chapa.model
77 |
78 |
The ResponseData class is an abstract class that 79 | represents the response data from Chapa API.
80 |
81 |
ResponseData() - Constructor for class com.yaphet.chapa.model.ResponseData
82 |
 
83 |
ResponseData(String, String, String, int) - Constructor for class com.yaphet.chapa.model.ResponseData
84 |
 
85 |
86 | A B C D E G I J L N P R S U V 
87 | 88 |
89 | 90 | 91 | 92 | 93 | 94 | 95 | 104 |
105 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/client/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.client 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Package com.yaphet.chapa.client

73 |
74 |
75 |
    76 |
  • 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 89 | 90 | 91 |
    Interface Summary 
    InterfaceDescription
    ChapaClient 87 |
    A client to interact with Chapa API.
    88 |
    92 |
  • 93 |
  • 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 106 | 107 | 108 |
    Class Summary 
    ClassDescription
    ChapaClientImpl 104 |
    A default implementation of ChapaClient.
    105 |
    109 |
  • 110 |
111 |
112 | 113 |
114 | 115 | 116 | 117 | 118 | 119 | 120 | 129 |
130 | 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /src/main/java/com/yaphet/chapa/model/VerifyResponseData.java: -------------------------------------------------------------------------------- 1 | package com.yaphet.chapa.model; 2 | 3 | import com.google.gson.annotations.JsonAdapter; 4 | import com.google.gson.annotations.SerializedName; 5 | import com.yaphet.chapa.utility.LocalDateTimeDeserializer; 6 | 7 | import java.math.BigDecimal; 8 | import java.time.LocalDateTime; 9 | 10 | public class VerifyResponseData extends ResponseData { 11 | 12 | private Data data; 13 | 14 | public VerifyResponseData() { 15 | } 16 | 17 | public VerifyResponseData(String rawJson, String message, String status, int statusCode, Data data) { 18 | super(rawJson, message, status, statusCode); 19 | this.data = data; 20 | } 21 | 22 | public VerifyResponseData setMessage(String message) { 23 | return (VerifyResponseData) super.setMessage(message); 24 | } 25 | 26 | public VerifyResponseData setStatus(String status) { 27 | return (VerifyResponseData) super.setStatus(status); 28 | } 29 | 30 | public VerifyResponseData setStatusCode(int statusCode) { 31 | return (VerifyResponseData) super.setStatusCode(statusCode); 32 | } 33 | 34 | public VerifyResponseData setRawJson(String rawJson) { 35 | return (VerifyResponseData) super.setRawJson(rawJson); 36 | } 37 | 38 | public VerifyResponseData setData(Data data) { 39 | this.data = data; 40 | return this; 41 | } 42 | 43 | public Data getData() { 44 | return data; 45 | } 46 | 47 | public static class Data { 48 | 49 | @SerializedName("first_name") 50 | private String firstName; 51 | @SerializedName("last_name") 52 | private String lastName; 53 | private String email; 54 | private String currency; 55 | private BigDecimal amount; 56 | private BigDecimal charge; 57 | private String mode; 58 | private String method; 59 | private String type; 60 | private String status; 61 | private String reference; 62 | @SerializedName("tx_ref") 63 | private String txRef; 64 | private Customization customization; 65 | private String meta; 66 | @SerializedName("created_at") 67 | @JsonAdapter(LocalDateTimeDeserializer.class) 68 | private LocalDateTime createdAt; 69 | @SerializedName("updated_at") 70 | @JsonAdapter(LocalDateTimeDeserializer.class) 71 | private LocalDateTime updatedAt; 72 | 73 | @SerializedName("first_name") 74 | public String getFirstName() { 75 | return firstName; 76 | } 77 | 78 | public VerifyResponseData.Data setFirstName(String firstName) { 79 | this.firstName = firstName; 80 | return this; 81 | } 82 | 83 | public String getLastName() { 84 | return lastName; 85 | } 86 | 87 | public VerifyResponseData.Data setLastName(String lastName) { 88 | this.lastName = lastName; 89 | return this; 90 | } 91 | 92 | public String getEmail() { 93 | return email; 94 | } 95 | 96 | public VerifyResponseData.Data setEmail(String email) { 97 | this.email = email; 98 | return this; 99 | } 100 | 101 | public String getCurrency() { 102 | return currency; 103 | } 104 | 105 | public VerifyResponseData.Data setCurrency(String currency) { 106 | this.currency = currency; 107 | return this; 108 | } 109 | 110 | public BigDecimal getAmount() { 111 | return amount; 112 | } 113 | 114 | public VerifyResponseData.Data setAmount(BigDecimal amount) { 115 | this.amount = amount; 116 | return this; 117 | } 118 | 119 | public BigDecimal getCharge() { 120 | return charge; 121 | } 122 | 123 | public VerifyResponseData.Data setCharge(BigDecimal charge) { 124 | this.charge = charge; 125 | return this; 126 | } 127 | 128 | public String getMode() { 129 | return mode; 130 | } 131 | 132 | public VerifyResponseData.Data setMode(String mode) { 133 | this.mode = mode; 134 | return this; 135 | } 136 | 137 | public String getMethod() { 138 | return method; 139 | } 140 | 141 | public VerifyResponseData.Data setMethod(String method) { 142 | this.method = method; 143 | return this; 144 | } 145 | 146 | public String getType() { 147 | return type; 148 | } 149 | 150 | public VerifyResponseData.Data setType(String type) { 151 | this.type = type; 152 | return this; 153 | } 154 | 155 | public String getStatus() { 156 | return status; 157 | } 158 | 159 | public VerifyResponseData.Data setStatus(String status) { 160 | this.status = status; 161 | return this; 162 | } 163 | 164 | public String getReference() { 165 | return reference; 166 | } 167 | 168 | public VerifyResponseData.Data setReference(String reference) { 169 | this.reference = reference; 170 | return this; 171 | } 172 | 173 | public String getTxRef() { 174 | return txRef; 175 | } 176 | 177 | public VerifyResponseData.Data setTxRef(String txRef) { 178 | this.txRef = txRef; 179 | return this; 180 | } 181 | 182 | public Customization getCustomization() { 183 | return customization; 184 | } 185 | 186 | public VerifyResponseData.Data setCustomization(Customization customization) { 187 | this.customization = customization; 188 | return this; 189 | } 190 | 191 | public String getMeta() { 192 | return meta; 193 | } 194 | 195 | public VerifyResponseData.Data setMeta(String meta) { 196 | this.meta = meta; 197 | return this; 198 | } 199 | 200 | public LocalDateTime getCreatedAt() { 201 | return createdAt; 202 | } 203 | 204 | public VerifyResponseData.Data setCreatedAt(LocalDateTime createdAt) { 205 | this.createdAt = createdAt; 206 | return this; 207 | } 208 | 209 | public LocalDateTime getUpdatedAt() { 210 | return updatedAt; 211 | } 212 | 213 | public VerifyResponseData.Data setUpdatedAt(LocalDateTime updatedAt) { 214 | this.updatedAt = updatedAt; 215 | return this; 216 | } 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /docs/index-files/index-4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | D-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

D

75 |
76 |
Data() - Constructor for class com.yaphet.chapa.model.InitializeResponseData.Data
77 |
 
78 |
Data() - Constructor for class com.yaphet.chapa.model.SubAccountResponseData.Data
79 |
 
80 |
Data() - Constructor for class com.yaphet.chapa.model.VerifyResponseData.Data
81 |
 
82 |
deserialize(JsonElement, Type, JsonDeserializationContext) - Method in class com.yaphet.chapa.utility.LocalDateTimeDeserializer
83 |
 
84 |
85 | A B C D E G I J L N P R S U V 
86 | 87 |
88 | 89 | 90 | 91 | 92 | 93 | 94 | 103 |
104 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /docs/index-files/index-8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | J-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

J

75 |
76 |
jsonToInitializeResponseData(String) - Static method in class com.yaphet.chapa.utility.Util
77 |
 
78 |
jsonToMap(String) - Static method in class com.yaphet.chapa.utility.Util
79 |
 
80 |
jsonToPostData(String) - Static method in class com.yaphet.chapa.utility.Util
81 |
 
82 |
jsonToSubAccount(String) - Static method in class com.yaphet.chapa.utility.Util
83 |
 
84 |
jsonToSubAccountResponseData(String) - Static method in class com.yaphet.chapa.utility.Util
85 |
 
86 |
jsonToVerifyResponseData(String) - Static method in class com.yaphet.chapa.utility.Util
87 |
 
88 |
89 | A B C D E G I J L N P R S U V 
90 | 91 |
92 | 93 | 94 | 95 | 96 | 97 | 98 | 107 |
108 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /docs/index-files/index-11.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | P-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

P

75 |
76 |
post(String, Map<String, Object>, String) - Method in interface com.yaphet.chapa.client.ChapaClient
77 |
 
78 |
post(String, String, String) - Method in interface com.yaphet.chapa.client.ChapaClient
79 |
 
80 |
post(String, Map<String, Object>, String) - Method in class com.yaphet.chapa.client.ChapaClientImpl
81 |
 
82 |
post(String, String, String) - Method in class com.yaphet.chapa.client.ChapaClientImpl
83 |
 
84 |
PostData - Class in com.yaphet.chapa.model
85 |
86 |
The PostData class is an object representation of JSON form data 87 | that will be posted to Chapa API.
88 |
89 |
PostData() - Constructor for class com.yaphet.chapa.model.PostData
90 |
 
91 |
92 | A B C D E G I J L N P R S U V 
93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 110 |
111 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /docs/index-files/index-15.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | V-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

V

75 |
76 |
valueOf(String) - Static method in enum com.yaphet.chapa.model.SplitType
77 |
78 |
Returns the enum constant of this type with the specified name.
79 |
80 |
values() - Static method in enum com.yaphet.chapa.model.SplitType
81 |
82 |
Returns an array containing the constants of this enum type, in 83 | the order they are declared.
84 |
85 |
verify(String) - Method in class com.yaphet.chapa.Chapa
86 |
 
87 |
VerifyResponseData - Class in com.yaphet.chapa.model
88 |
 
89 |
VerifyResponseData() - Constructor for class com.yaphet.chapa.model.VerifyResponseData
90 |
 
91 |
VerifyResponseData(String, String, String, int, VerifyResponseData.Data) - Constructor for class com.yaphet.chapa.model.VerifyResponseData
92 |
 
93 |
VerifyResponseData.Data - Class in com.yaphet.chapa.model
94 |
 
95 |
96 | A B C D E G I J L N P R S U V 
97 | 98 |
99 | 100 | 101 | 102 | 103 | 104 | 105 | 114 |
115 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /docs/index-files/index-7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | I-Index 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
A B C D E G I J L N P R S U V  72 | 73 | 74 |

I

75 |
76 |
initialize(PostData) - Method in class com.yaphet.chapa.Chapa
77 |
78 |
This method is used to initialize payment in Chapa.
79 |
80 |
initialize(String) - Method in class com.yaphet.chapa.Chapa
81 |
82 |
This method is used to initialize payment in Chapa.
83 |
84 |
InitializeResponseData - Class in com.yaphet.chapa.model
85 |
 
86 |
InitializeResponseData() - Constructor for class com.yaphet.chapa.model.InitializeResponseData
87 |
 
88 |
InitializeResponseData(String, String, String, int, InitializeResponseData.Data) - Constructor for class com.yaphet.chapa.model.InitializeResponseData
89 |
 
90 |
InitializeResponseData.Data - Class in com.yaphet.chapa.model
91 |
 
92 |
is2xxSuccessful(int) - Static method in class com.yaphet.chapa.utility.Util
93 |
 
94 |
95 | A B C D E G I J L N P R S U V 
96 | 97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | 113 |
114 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/model/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.model Class Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Hierarchy For Package com.yaphet.chapa.model

73 | Package Hierarchies: 74 | 77 |
78 |
79 |

Class Hierarchy

80 | 100 |

Enum Hierarchy

101 |
    102 |
  • java.lang.Object 103 |
      104 |
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) 105 |
        106 |
      • com.yaphet.chapa.model.SplitType
      • 107 |
      108 |
    • 109 |
    110 |
  • 111 |
112 |
113 | 114 |
115 | 116 | 117 | 118 | 119 | 120 | 121 | 130 |
131 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | ,-----. ,--. ,--. 3 | ' .--./ | ,---. ,--,--. ,---. ,--,--. ,-----. | | ,--,--. ,--. ,--. ,--,--. 4 | | | | .-. | ' ,-. | | .-. | ' ,-. | '-----' ,--. | | ' ,-. | \ `' / ' ,-. | 5 | ' '--'\ | | | | \ '-' | | '-' ' \ '-' | | '-' / \ '-' | \ / \ '-' | 6 | `-----' `--' `--' `--`--' | |-' `--`--' `-----' `--`--' `--' `--`--' 7 | ``` 8 | 9 | [![BUILD](https://github.com/yaphet17/chapa-java/actions/workflows/maven.yml/badge.svg)](https://github.com/yaphet17/chapa-java/actions/workflows/maven.yml/) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.yaphet17/Chapa/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.yaphet17/Chapa) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 10 | 11 | Unofficial Java SDK for Chapa Payment Gateway. 12 | 13 | ## What's new in this version 14 | - You no longer need to deal with `JSON` or `Map` responses. You can just treat response data as a Java object using specific response classes for each request type (e.g. payment initialization, payment verification). 15 | - Better exception handling. The SDK will throw the newly added `ChapaException` on failed requests to Chapa API. 16 | - Bug fixes and design improvements. 17 | - Well-tested and documented code. Check out the Javadoc [here](https://yaphet17.github.io/chapa-java/). 18 | 19 | ## Table of Contents 20 | 1. [Documentation](#documentation) 21 | 2. [Installation](#installation) 22 | 3. [Usage](#usage) 23 | 4. [Javadoc](https://yaphet17.github.io/chapa-java/) 24 | 5. [Contribution](#contribution) 25 | 6. [Example](#example) 26 | 7. [License](#license) 27 | 28 | ## Documentation 29 | Visit official [Chapa's API Documentation](https://developer.chapa.co/docs) 30 | ## Installation 31 | Add the below maven dependency to your `pom.xml` file. 32 | ```xml 33 | 34 | io.github.yaphet17 35 | Chapa 36 | 1.2.2 37 | 38 | ``` 39 | Or add the below gradle dependency to your `build.gradle` file. 40 | ```groovy 41 | implementation 'io.github.yaphet17:Chapa:1.2.2' 42 | ``` 43 | 44 | ## Usage 45 | 46 | Instantiate a `Chapa` class. 47 | ```java 48 | Chapa chapa = new Chapa("your-secrete-key"); 49 | ``` 50 | Or if you want to use your own implementation of `ChapaClient` interface. 51 | ```java 52 | Chapa chapa = new Chapa("your-secrete-key", new MyCustomChapaClient()); 53 | ``` 54 | Note: `MyCustomChapaClient` must implement `ChapaClient` interface. 55 | 56 | To initialize a transaction, you can specify your information by either using our `PostData` class. 57 | 58 | Note: Starting from version 1.1.0 you have to specify customization fields as a `Map` object. 59 | 60 | ```java 61 | Customization customization = new Customization() 62 | .setTitle("E-commerce") 63 | .setDescription("It is time to pay") 64 | .setLogo("https://mylogo.com/log.png"); 65 | PostData postData = new PostData() 66 | .setAmount(new BigDecimal("100")) 67 | .setCurrency("ETB") 68 | .setFirstName("Abebe") 69 | .setLastName("Bikila") 70 | .setEmail("abebe@bikila") 71 | .setTxRef(Util.generateToken()) 72 | .setCallbackUrl("https://chapa.co") 73 | .setReturnUrl("https://chapa.co") 74 | .setSubAccountId("testSubAccountId") 75 | .setCustomization(customization); 76 | ``` 77 | Or, you can use a string JSON data. 78 | ```java 79 | String formData = " { " + 80 | "'amount': '100', " + 81 | "'currency': 'ETB'," + 82 | "'email': 'abebe@bikila.com'," + 83 | "'first_name': 'Abebe'," + 84 | "'last_name': 'Bikila'," + 85 | "'tx_ref': 'tx-myecommerce12345'," + 86 | "'callback_url': 'https://chapa.co'," + 87 | "'subaccount[id]': 'ACCT_xxxxxxxxx'," + 88 | "'customizations':{" + 89 | " 'customization[title]':'E-commerce'," + 90 | " 'customization[description]':'It is time to pay'," + 91 | " 'customization[logo]':'https://mylogo.com/log.png'" + 92 | " }" + 93 | " }"; 94 | ``` 95 | Initialize payment 96 | ```java 97 | InitializeResponseData responseData = chapa.initialize(postData); 98 | // Get the response message 99 | System.out.println(responseData.getMessage()); 100 | // Get the checkout URL from the response JSON 101 | System.out.println(responseData.getData().getCheckOutUrl()); 102 | // Get the raw response JSON 103 | System.out.println(responseData.getRawJson()); 104 | ``` 105 | Verify payment 106 | ```java 107 | // Get the verification response data 108 | VerifyResponseData verifyResponseData = chapa.verify("tx-myecommerce12345"); 109 | ``` 110 | Get the list of banks 111 | ```java 112 | List banks = chapa.getBanks(); 113 | ``` 114 | To create a subaccount, you can specify your information by either using our `Subaccount` class. 115 | ```java 116 | SubAccount subAccount = new SubAccount() 117 | .setBusinessName("Abebe Suq") 118 | .setAccountName("Abebe Bikila") 119 | .setAccountNumber("0123456789") 120 | .setBankCode("96e41186-29ba-4e30-b013-2ca36d7e7025") 121 | .setSplitType(SplitType.PERCENTAGE) 122 | .setSplitValue(0.2); 123 | ``` 124 | Or, you can use a string JSON data. 125 | ```java 126 | String subAccount = " { " + 127 | "'business_name': 'Abebe Suq', " + 128 | "'account_name': 'Abebe Bikila'," + 129 | "'account_number': '0123456789'," + 130 | "'bank_code': '96e41186-29ba-4e30-b013-2ca36d7e7025'," + 131 | "'split_type': 'percentage'," + 132 | "'split_value': '0.2'" + 133 | " }"; 134 | ``` 135 | Create subaccount 136 | ```java 137 | SubAccountResponseData subAccountResponseData = chapa.createSubAccount(subAccount); 138 | // Get SubAccount id from the response JSOn 139 | System.out.println(subAccountResponseData.getData().getSubAccountId()); 140 | ``` 141 | ## Example 142 | ```java 143 | import java.math.BigDecimal; 144 | import java.util.HashMap; 145 | import java.util.List; 146 | import java.util.Map; 147 | 148 | import io.github.yaphet17.chapa.Chapa; 149 | import io.github.yaphet17.chapa.PostData; 150 | import io.github.yaphet17.chapa.SubAccount; 151 | import io.github.yaphet17.chapa.SplitType; 152 | import io.github.yaphet17.chapa.Bank; 153 | 154 | public class ChapaExample { 155 | 156 | public static void main(String[] args) { 157 | Chapa chapa = new Chapa("your-secrete-key"); 158 | 159 | Customization customization = new Customization() 160 | .setTitle("E-commerce") 161 | .setDescription("It is time to pay") 162 | .setLogo("https://mylogo.com/log.png"); 163 | 164 | PostData postData = new PostData() 165 | .setAmount(new BigDecimal("100")) 166 | .setCurrency("ETB") 167 | .setFirstName("Abebe") 168 | .setLastName("Bikila") 169 | .setEmail("abebe@bikila") 170 | .setTxRef(Util.generateToken()) 171 | .setCallbackUrl("https://chapa.co") 172 | .setReturnUrl("https://chapa.co") 173 | .setSubAccountId("testSubAccountId") 174 | .setCustomization(customization); 175 | 176 | SubAccount subAccount = new SubAccount() 177 | .setBusinessName("Abebe Suq") 178 | .setAccountName("Abebe Bikila") 179 | .setAccountNumber("0123456789") 180 | .setBankCode("96e41186-29ba-4e30-b013-2ca36d7e7025") 181 | .setSplitType(SplitType.PERCENTAGE) 182 | .setSplitValue(0.2); 183 | 184 | 185 | InitializeResponseData responseData = chapa.initialize(postData); 186 | VerifyResponseData verifyResponseData = chapa.verify("tx-myecommerce12345"); 187 | SubAccountResponseData subAccountResponseData = chapa.createSubAccount(subAccount); 188 | 189 | } 190 | } 191 | ``` 192 | ## Contribution 193 | If you find any bugs or have any suggestions, please feel free to open an issue or pull request. 194 | 195 | ## License 196 | This open-source library is licensed under the terms of the MIT License. 197 | 198 | Enjoy! 199 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 4.0.0 6 | 7 | io.github.yaphet17 8 | Chapa 9 | 1.3.0-SNAPSHOT 10 | jar 11 | 12 | Chapa 13 | Java package for Chapa Payment Gateway 14 | https://github.com/yaphet17/chapa-java 15 | 16 | 17 | Yafet Berhanu 18 | yafetberhanu3@gmail.com 19 | 20 | 21 | 22 | 23 | scm:git:git://github.com/yaphet17/chapa-java.git 24 | scm:git:ssh://github.com:yaphet17/chapa-java.git 25 | http://github.com/yapht17/chapa-java/tree/main 26 | 27 | 28 | 29 | UTF-8 30 | 1.7 31 | 1.7 32 | 2.2.27 33 | 34 | 35 | 36 | 37 | com.mashape.unirest 38 | unirest-java 39 | 1.4.9 40 | 41 | 42 | com.google.code.gson 43 | gson 44 | 2.8.9 45 | 46 | 47 | org.junit.jupiter 48 | junit-jupiter 49 | 5.9.0 50 | test 51 | 52 | 53 | org.mockito 54 | mockito-junit-jupiter 55 | 4.6.1 56 | test 57 | 58 | 59 | org.mockito 60 | mockito-inline 61 | 3.8.0 62 | test 63 | 64 | 65 | org.skyscreamer 66 | jsonassert 67 | 1.5.0 68 | test 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | maven-clean-plugin 78 | 3.1.0 79 | 80 | 81 | 82 | maven-resources-plugin 83 | 3.0.2 84 | 85 | 86 | maven-compiler-plugin 87 | 3.8.0 88 | 89 | 90 | maven-surefire-plugin 91 | 2.22.1 92 | 93 | 94 | maven-jar-plugin 95 | 3.0.2 96 | 97 | 98 | maven-install-plugin 99 | 2.5.2 100 | 101 | 102 | maven-deploy-plugin 103 | 2.8.2 104 | 105 | 106 | 107 | maven-site-plugin 108 | 3.7.1 109 | 110 | 111 | maven-project-info-reports-plugin 112 | 3.0.0 113 | 114 | 115 | 116 | 117 | 118 | org.apache.maven.plugins 119 | maven-source-plugin 120 | 3.2.0 121 | 122 | 123 | attach-sources 124 | 125 | jar-no-fork 126 | 127 | 128 | 129 | 130 | 131 | org.apache.maven.plugins 132 | maven-gpg-plugin 133 | 3.0.1 134 | 135 | 136 | sign-artifacts 137 | verify 138 | 139 | sign 140 | 141 | 142 | 143 | 144 | 145 | org.apache.maven.plugins 146 | maven-javadoc-plugin 147 | 3.2.0 148 | 149 | 150 | attach-javadocs 151 | 152 | jar 153 | 154 | 155 | 156 | 157 | 8 158 | 159 | 160 | 161 | org.apache.maven.plugins 162 | maven-compiler-plugin 163 | 164 | 8 165 | 8 166 | 167 | 168 | 169 | org.sonatype.plugins 170 | nexus-staging-maven-plugin 171 | 1.6.13 172 | true 173 | 174 | ossrh 175 | https://s01.oss.sonatype.org/ 176 | true 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | MIT License 185 | http://www.opensource.org/licenses/mit-license.php 186 | 187 | 188 | 189 | 190 | 191 | ossrh 192 | https://s01.oss.sonatype.org/content/repositories/snapshots 193 | 194 | 195 | ossrh 196 | https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ 197 | 198 | 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /docs/com/yaphet/chapa/model/package-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | com.yaphet.chapa.model 7 | 8 | 9 | 10 | 11 | 12 | 22 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 42 |
43 | 70 | 71 |
72 |

Package com.yaphet.chapa.model

73 |
74 |
75 | 153 |
154 | 155 |
156 | 157 | 158 | 159 | 160 | 161 | 162 | 171 |
172 | 199 | 200 | 201 | 202 | --------------------------------------------------------------------------------