weepay-java

weepay integration for java

License

License

Categories

Categories

Java Languages
GroupId

GroupId

co.weepay
ArtifactId

ArtifactId

weepay-java
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

weepay-java
weepay integration for java
Project URL

Project URL

https://github.com/weepay/weepay-java
Source Code Management

Source Code Management

https://github.com/weepay/weepay-java/tree/main

Download weepay-java

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.commons : commons-lang3 jar 3.4
org.json : json jar 20180813
com.google.code.gson : gson jar 2.5

test (1)

Group / Artifact Type Version
junit : junit jar 4.13.1

Project Modules

There are no modules declared in this project.

weepay-java

Maven Central

weepay integration for java

You can sign up or sign in for an weepay account at https://weepay.co

Requirements

Java version 1.7 or newer

Installation

Maven installation

<dependency>
  <groupId>co.weepay</groupId>
  <artifactId>weepay-java</artifactId>
  <version>1.0.0</version>
</dependency>

Gradle installation

compile "co.weepay:weepay-java:1.0.0"

Other installation

If you use Gradle Groovy DSL, Gradle Kotlin DSL, Scala SBT, Apache Ivy, Groovy Grape, Leiningen, Apache Buildr, Maven Central Badge, PURL, Bazel you should visit this page maven.org and select version.

You'll need to manually install the following JARs:

Build

If you don't have Maven installed in your local environment, you can use Maven Wrapper script:

./mvnw clean install

Usage

    //Auth
    Auth options = new Auth();

    options.setBayiId(bayiId);
    options.setApiKey("apiKey");
    options.setSecretKey("secretKey");
    options.setBaseUrl("https://api.weepay.co");

    // Request
    FormInitializeRequest request = new FormInitializeRequest();
    request.setOptions(options);
    request.setOrderId("1");
    request.setIpAddress("192.168.1.2");
    request.setPrice(35.50);
    request.setCurrency(Currency.TL.name());
    request.setLocale(Locale.TR.getValue());
    request.setDescription("Açıklama Alanı");
    request.setCallBackUrl("https://websitem.com/callback");
    request.setInstallmentNumber(1);
    request.setPaymentGroup(PaymentGroup.PRODUCT.name());
    request.setPaymentChannel(PaymentChannel.WEB.name());

    // Customer
    Customer customer = new Customer();
    customer.setCustomerId(1);
    customer.setCustomerName("isim");
    customer.setCustomerSurname("soyisim");
    customer.setGsmNumber("50XXXXXX");
    customer.setEmail("[email protected]");
    customer.setIdentityNumber("00032222721");
    customer.setCity("istanbul");
    customer.setCountry("turkey");
    request.setCustomer(customer);

    // Address
    // Billing Address
    Address billingAddress = new Address();
    billingAddress.setContactName("isim soyisim");
    billingAddress.setAddress("address");
    billingAddress.setCity("city");
    billingAddress.setCountry("turkey");
    billingAddress.setZipCode("34164");
    request.setBillingAddress(billingAddress);

    // Address
    // Shipping Address
    Address shippingAddress = new Address();
    shippingAddress.setContactName("isim soyisim");
    shippingAddress.setAddress("address");
    shippingAddress.setCity("city");
    shippingAddress.setCountry("turkey");
    shippingAddress.setZipCode("34164");
    request.setShippingAddress(shippingAddress);

    // Products
    // First Product
    List<Product> products = new ArrayList<Product>();
    Product firstProduct = new Product();
    firstProduct.setName("Ürün bir");
    firstProduct.setProductId(1234);
    firstProduct.setProductPrice(0.10);
    firstProduct.setItemType(ProductType.PHYSICAL.name());
    products.add(firstProduct);

    // Second Product
    Product secondProduct = new Product();
    secondProduct.setName("Ürün iki");
    secondProduct.setProductId(4567);
    secondProduct.setProductPrice(0.10);
    secondProduct.setItemType(ProductType.PHYSICAL.name());
    products.add(secondProduct);
    request.setProducts(products);

    CheckoutFormInitialize payment = CheckoutFormInitialize.create(request, options);
    System.out.println(payment.getCheckoutFormData());

If you have any questions, please don't hesitate to contact us via Github with open an issue or contact us at [email protected].

Versions

Version
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.0.2
0.0.1