payabbhi-java

Payabbhi Java Library.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования
Группа

Группа

com.payabbhi
Идентификатор

Идентификатор

payabbhi-java
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

payabbhi-java
Payabbhi Java Library.
Ссылка на сайт

Ссылка на сайт

https://github.com/payabbhi/payabbhi-java
Организация-разработчик

Организация-разработчик

Payabbhi
Система контроля версий

Система контроля версий

https://github.com/payabbhi/payabbhi-java.git

Скачать payabbhi-java

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.payabbhi/payabbhi-java/ -->
<dependency>
    <groupId>com.payabbhi</groupId>
    <artifactId>payabbhi-java</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.payabbhi/payabbhi-java/
implementation 'com.payabbhi:payabbhi-java:1.0.2'
// https://jarcasting.com/artifacts/com.payabbhi/payabbhi-java/
implementation ("com.payabbhi:payabbhi-java:1.0.2")
'com.payabbhi:payabbhi-java:jar:1.0.2'
<dependency org="com.payabbhi" name="payabbhi-java" rev="1.0.2">
  <artifact name="payabbhi-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.payabbhi', module='payabbhi-java', version='1.0.2')
)
libraryDependencies += "com.payabbhi" % "payabbhi-java" % "1.0.2"
[com.payabbhi/payabbhi-java "1.0.2"]

Зависимости

runtime (3)

Идентификатор библиотеки Тип Версия
com.squareup.okhttp3 : okhttp jar 3.10.0
org.json : json jar 20180130
commons-codec : commons-codec jar 1.11

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-core jar [2.0,)

Модули Проекта

Данный проект не имеет модулей.

Payabbhi Java Library

Make sure you have signed up for your Payabbhi Account and downloaded the API keys from the Portal.

Requirements

Java 1.7 or later.

Installation

Maven

Include this dependency in your Maven pom.xml:

<dependency>
  <groupId>com.payabbhi</groupId>
  <artifactId>payabbhi-java</artifactId>
  <version>1.0.2</version>
</dependency>

Gradle

Include this dependency in your Gradle build file build.gradle:

compile "com.payabbhi:payabbhi-java:1.0.2"

Manual Download

An alternative is to manually download the JAR for Payabbhi Java Library from Maven repository

Payabbhi Java library has the following dependencies which should be included separately:

Documentation

Please refer to:

Usage

A typical usage of the Payabbhi Java Library is shown below:

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.payabbhi.Payabbhi;
import com.payabbhi.exception.PayabbhiException;
import com.payabbhi.model.Order;

public class Example {

	public static void main(String[] args) {

		Payabbhi.accessId  = "<your-access-id>";
		Payabbhi.secretKey = "<your-secret-key>";

		try {
			Map<String, Object> params = new HashMap<>();
			params.put("merchant_order_id", "0211");
			params.put("amount", 10000);
			params.put("currency", "INR");

			Order order = Order.create(params);

			System.out.println(order);

		} catch (PayabbhiException e) {
			e.printStackTrace();
		}
	}

}

For more examples see the Java API documentation

Payment Signature Verification

Payabbhi Java library provides utility function for verifying the payment signature received in the payment callback.

Map<String, String> params = new HashMap()
params.put("order_id", "<order-id>");
params.put("payment_id", "<payment-id>");
params.put("payment_signature", "<payment-signature>");
Payabbhi.verifyPaymentSignature(params)

Webhook Signature Verification

Payabbhi Java library provides utility function for webhook signature verification.

import com.payabbhi.Payabbhi;

// In this call default value of replayInterval is 300 seconds
Payabbhi.verifyWebhookSignature("<payload>", "<signature>", "<secret>");

Payabbhi.verifyWebhookSignature("<payload>", "<signature>", "<secret>", <replayInterval>);

Test

Comment the following lines of code in the file build.gradle as below

// id 'signing'
// signing {
//     sign configurations.archives
// }

Run the following command to build and execute unit tests

$ gradle build

A html report will be generated in file build/reports/tests/test/index.html

com.payabbhi

Payabbhi

Версии библиотеки

Версия
1.0.2
1.0.1
1.0.0