Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Typos #9

Open
wants to merge 112 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
a09666b
fix url query params
marti1125 Mar 17, 2017
f2f74f3
fix List
marti1125 Mar 17, 2017
3e4e92d
update src/test/java/CulqiAllTest.java
marti1125 Mar 17, 2017
44c0a73
update README.md
marti1125 Mar 17, 2017
6854efe
improve list of data ResponseHelper.java
marti1125 Mar 18, 2017
0b6856e
update documentation
marti1125 Mar 18, 2017
2bd4486
#2 se puede instalar desde pom.xml de forma facil
marti1125 May 12, 2017
c301ed0
update version 1.1.9
marti1125 Jun 1, 2017
11bbfba
update README.md
marti1125 Jun 1, 2017
ad8c6c3
actualizacion del README.md
marti1125 Aug 2, 2017
591d77d
Create README_EN.md
jeancedron Oct 16, 2017
c6e4efb
Merge pull request #7 from jeancedron/master
Oct 16, 2017
f9df3f0
Translate for the README.md file
iCueto Oct 17, 2017
88dfbde
Merge pull request #8 from iCueto/master
marti1125 Oct 17, 2017
6eb5395
Update README_EN.md
jeancedron Oct 17, 2017
372712e
Merge pull request #10 from jeancedron/patch-1
Oct 17, 2017
239a8bf
Update README.md
jeancedron Oct 17, 2017
31fddf2
Typo Fix
Oct 17, 2017
3fbf98c
update version of dependency jackson-databind
LizRuelasB May 27, 2019
f925b83
Merge pull request #12 from lucasleon2107/master
joelibaceta Oct 2, 2019
9562812
Merge pull request #11 from jeancedron/patch-2
joelibaceta Oct 2, 2019
aa750bb
fix: .travis.yml
Vinetos Oct 2, 2019
a8bc857
Merge pull request #13 from LizRuelas/patch-1
joelibaceta Oct 3, 2019
e96ab39
Merge pull request #15 from Vinetos/patch-1
joelibaceta Oct 3, 2019
444b489
add methods to java library
Dec 15, 2022
fd28959
fix confirm method
Dec 19, 2022
e0088d1
fix confirm method
Dec 19, 2022
66748d4
readme
JoseHCalderon Dec 23, 2022
92a833b
readme
JoseHCalderon Dec 27, 2022
55fe7d8
Merge pull request #29 from culqi/ft/add-new-methods
JoseHCalderon Dec 27, 2022
0e779d8
readme
JoseHCalderon Dec 27, 2022
1205ba7
Merge pull request #30 from culqi/ft/add-new-methods
JoseHCalderon Dec 27, 2022
936fab3
se agrego encriptacion
JordanCulqi Apr 14, 2023
967f58b
se agrego encriptado
JordanCulqi Apr 14, 2023
0fb85b5
commit encrypt_change
Apr 20, 2023
6cd1a35
encrypt
Apr 28, 2023
8777eea
encrypt
Apr 28, 2023
c12f6d0
encrypt
Apr 28, 2023
96349e9
ajustes
Apr 30, 2023
3b66ce4
ajustes
May 1, 2023
41447ed
lib_java
Jul 4, 2023
eee479c
v3.0.0.0
Jul 5, 2023
54a7114
changes
JoseHCalderon Jul 5, 2023
e47c042
change
JoseHCalderon Jul 5, 2023
a9674b4
Merge pull request #36 from culqi/feature/statuscode
JoseHCalderon Jul 5, 2023
79bc683
readme
JoseHCalderon Jul 5, 2023
c9e95ba
readme
JoseHCalderon Jul 5, 2023
ebc342b
gcm
Jul 20, 2023
fba38ee
Merge pull request #37 from culqi/feature/aes_gcm
JoseHCalderon Aug 4, 2023
25594ab
readme
JoseHCalderon Aug 10, 2023
7734580
readme
JoseHCalderon Aug 11, 2023
45e36e3
Update README.md
JordanCulqi Aug 17, 2023
eb2f465
Update README.md
JordanCulqi Aug 17, 2023
2c7b8c9
Update README.md
JordanCulqi Aug 17, 2023
7ccde02
Update README.md
JordanCulqi Aug 17, 2023
7bc4841
Update README.md
JordanCulqi Aug 17, 2023
3d821ec
readme
JoseHCalderon Aug 18, 2023
40569f4
readme
JoseHCalderon Aug 18, 2023
55bf213
readme
JoseHCalderon Aug 18, 2023
dcba1e6
Merge pull request #38 from culqi/feature/aes_gcm
JoseHCalderon Aug 18, 2023
ccf37a2
v2.0.1
Aug 19, 2023
8bab38e
Merge branch 'feature/aes_gcm' of [email protected]:culqi/culqi-java.git…
Aug 19, 2023
d111cde
Merge pull request #39 from culqi/feature/aes_gcm
JoseHCalderon Aug 19, 2023
83aa56b
readme
JoseHCalderon Aug 19, 2023
e2ba245
readme
JoseHCalderon Aug 21, 2023
42bc473
readme
JoseHCalderon Aug 21, 2023
2eba26b
readme
JoseHCalderon Aug 21, 2023
99e9e2a
readme
JoseHCalderon Aug 21, 2023
a1e3029
v2.0.2
Aug 21, 2023
1b79032
feature: validate params
Dec 4, 2023
9af9c28
feat: params validation
Jan 3, 2024
ac1e46a
fix: java headers
Jan 3, 2024
07d7a0d
fix: support java8
Jan 3, 2024
08ff8c9
fix: cast currency to string
Jan 3, 2024
cad4d74
fix: plan validation
Jan 4, 2024
2c6a90a
fix: refund
Jan 4, 2024
545dab6
fix: date validation
Jan 4, 2024
fd91215
fix: date validation
Jan 4, 2024
0fbe042
fix: date validation
Jan 4, 2024
6cc1e2c
fix: date validation
Jan 4, 2024
0380de6
add headers to list
Jan 4, 2024
7371b87
fix: customException
Jan 4, 2024
626bd98
Merge pull request #40 from culqi/feature/params-validation
JoseHCalderon Jan 5, 2024
edf21be
fix validate services request plan and subscriptions
brandoCarquin Jan 26, 2024
789af18
fix validate services request plan and subscriptions
brandoCarquin Feb 1, 2024
beb0834
fix validate services request plan and subscriptions
brandoCarquin Feb 5, 2024
be5cd82
fix validate services request plan and subscriptions
brandoCarquin Feb 6, 2024
9cbf560
fix error in terminal
brandoCarquin Feb 9, 2024
bf26b50
fix error in terminal
brandoCarquin Feb 12, 2024
9ad6acd
fix error in terminal
brandoCarquin Feb 12, 2024
dc10b8e
fix error in terminal
brandoCarquin Feb 12, 2024
5ae95cc
fix error in terminal
brandoCarquin Feb 12, 2024
0e32243
fix error in terminal
brandoCarquin Feb 12, 2024
9d59c88
valid date from
brandoCarquin Feb 12, 2024
63998cb
valid date from
brandoCarquin Feb 12, 2024
1edf424
change delete log
brandoCarquin Apr 9, 2024
6ba0127
new valdiation plans
brandoCarquin May 15, 2024
c8fd030
feat: Add custom headers to POST endpoints Culqi API
renato-coronado Aug 16, 2024
06f8b90
feature: RSA tests are added for patch services, and recurrent servic…
renato-coronado Sep 23, 2024
ff85af8
Minor changes
renato-coronado Sep 23, 2024
7560fed
Merge pull request #42 from culqi/feature/headers-config
JoseHCalderon Sep 25, 2024
8a01a0a
fix: Delete generateCurlCommand
renato-coronado Sep 25, 2024
99f0d5d
Merge branch 'master' into feature/SMANUNE-2440
renato-coronado Sep 27, 2024
53c066e
Merge pull request #43 from culqi/feature/SMANUNE-2440
JoseHCalderon Sep 27, 2024
9288d7d
format domain services get
brandoCarquin Oct 24, 2024
6f1cf8e
Merge pull request #45 from culqi/feature/api-base-service-get
JoseHCalderon Oct 24, 2024
89563c2
header cotent type
brandoCarquin Nov 13, 2024
d3d15ab
Solution test
brandoCarquin Nov 14, 2024
ded8e57
Solution test
brandoCarquin Nov 14, 2024
4a6f71a
Merge pull request #46 from culqi/featrue/solution-bugs
JoseHCalderon Nov 14, 2024
695439c
v2.0.4
JoseHCalderon Dec 3, 2024
24e43bf
Merge pull request #47 from culqi/featrue/solution-bugs
JoseHCalderon Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
target
*.iml
dependency-reduced-pom.xml
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.1.9 31-05-2017
* Add TimeOut Exception

### 1.1.8 16-03-2017
* Fixed url query params for List data

### 1.1.7 15-03-2017
* Improved method List data for all resources
* Fixex Timeout for List data
Expand Down
59 changes: 57 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,39 @@ Biblioteca de CULQI para el lenguaje Java, pagos simples en tu sitio web. Consum

| Versión actual|Culqi API|
|----|----|
| 1.1.7 (2017-03-16) |[v2](https://culqi.com/api/)|
| 1.1.9 (2017-05-31) |[v2](https://culqi.com/api/)|

## Requisitos

- Java 1.7+
- Credenciales de comercio en Culqi (1).

## Ejemplos
## Instalación

Instalación usando Maven:

Solo necesita agregar el siguiente repositorio en el archivo pom.xml

```xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
```

Luego agregar la dependencia:

```xml
<dependency>
<groupId>com.github.culqi</groupId>
<artifactId>culqi-java</artifactId>
<version>v1.1.9</version>
</dependency>
```

## Ejemplos

#### Inicialización

Expand All @@ -42,6 +66,13 @@ Map<String, Object> token_created = culqi.token.create(token);

```java
Map<String, Object> charge = new HashMap<String, Object>();
Map<String, Object> antifraudDetails = new HashMap<String, Object>();
antifraudDetails.put("address", "Calle Narciso de Colina 421 Miraflores");
antifraudDetails.put("address_city", "LIMA");
antifraudDetails.put("country_code", "PE");
antifraudDetails.put("first_name", "Willy");
antifraudDetails.put("last_name", "Aguirre");
antifraudDetails.put("phone_number", "012767623");
Map<String, Object> metadata = new HashMap<String, Object>();
metadata.put("oder_id", "124");
charge.put("amount",1000);
Expand All @@ -50,6 +81,7 @@ charge.put("currency_code",CurrencyCode.PEN);
charge.put("description","Venta de prueba");
charge.put("email","[email protected]");
charge.put("installments", 0);
charge.put("antifraud_details", antifraudDetails);
charge.put("metadata", metadata);
charge.put("source_id", token_created.get("id").toString());
Map<String, Object> charge_created = culqi.charge.create(charge);
Expand Down Expand Up @@ -129,6 +161,12 @@ Todos los cambios en las versiones de esta biblioteca están listados en [CHANGE
- [okhttp3](http://square.github.io/okhttp/)
- [Jackson Core Databind](https://github.com/FasterXML/jackson-databind/wiki)

## Build

```bash
mvn package -DskipTests
```

## Testing

Debes tener instalado Maven para poder ejecutar los tests
Expand All @@ -149,6 +187,23 @@ mvn test -D test=CulqiCreateTest#test6ValidCreateSubscription
mvn test -D test=CulqiCreateTest#test7ChargeCapture
```

## ¿Cómo instalar el jar de Culqi en un proyecto Maven?

```bash
mvn install:install-file -Dfile={dir}/culqi-java-1.1.8.jar -DgroupId=com.culqi -DartifactId=culqi-java -Dversion={version} -Dpackaging=jar
```


Luego agregas la siguiente dependencia en el pom.xml

```xml
<dependency>
<groupId>com.culqi</groupId>
<artifactId>culqi-java</artifactId>
<version>{version}</version>
</dependency>
```

## Autor

Willy Aguirre ([@marti1125](https://github.com/marti1125) - Team Culqi)
Expand Down
211 changes: 211 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
# Culqi Java

[![Code Climate](https://codeclimate.com/github/culqi/culqi-java/badges/gpa.svg)](https://codeclimate.com/github/culqi/culqi-java)
[![Build Status](https://travis-ci.org/culqi/culqi-java.svg?branch=master)](https://travis-ci.org/culqi/culqi-java)

Library of CULQI for the Java language, simple payments in your website. Use the Culqi API.

| Current version |Culqi API|
|----|----|
| 1.1.9 (2017-05-31) |[v2](https://culqi.com/api/)|

## Requirements

- Java 1.7+
- Trade credentials in Culqi (1).

## Installation

Installation using Maven:
Just need to add the following repository in the pom.xml

```xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
```

Then add the dependency

```xml
<dependency>
<groupId>com.github.culqi</groupId>
<artifactId>culqi-java</artifactId>
<version>v1.1.9</version>
</dependency>
```

## Examples

#### Initialization

```java
Culqi culqi = new Culqi();
culqi.public_key = "{PUBLIC_KEY}";
culqi.secret_key = "{SECRET_KEY}"
```

#### Create Token

```java
Map<String, Object> token = new HashMap<String, Object>();
token.put("card_number", "4111111111111111");
token.put("cvv", "123");
token.put("email", "[email protected]");
token.put("expiration_month", 9);
token.put("expiration_year", 2020);
Map<String, Object> token_created = culqi.token.create(token);

```

#### Create Charge

```java
Map<String, Object> charge = new HashMap<String, Object>();
Map<String, Object> antifraudDetails = new HashMap<String, Object>();
antifraudDetails.put("address", "Calle Narciso de Colina 421 Miraflores");
antifraudDetails.put("address_city", "LIMA");
antifraudDetails.put("country_code", "PE");
antifraudDetails.put("first_name", "Willy");
antifraudDetails.put("last_name", "Aguirre");
antifraudDetails.put("phone_number", "012767623");
Map<String, Object> metadata = new HashMap<String, Object>();
metadata.put("oder_id", "124");
charge.put("amount",1000);
charge.put("capture", true);
charge.put("currency_code",CurrencyCode.PEN);
charge.put("description","Sale Test");
charge.put("email","[email protected]");
charge.put("installments", 0);
charge.put("antifraud_details", antifraudDetails);
charge.put("metadata", metadata);
charge.put("source_id", token_created.get("id").toString());
Map<String, Object> charge_created = culqi.charge.create(charge);

```

#### Create Plan

```java
Map<String, Object> plan = new HashMap<String, Object>();
Map<String, Object> metadata = new HashMap<String, Object>();
metadata.put("oder_id", "124");
plan.put("amount",1000);
plan.put("currency_code",CurrencyCode.PEN);
plan.put("interval","dias");
plan.put("interval_count",30);
plan.put("limit", 4);
plan.put("metadata", metadata);
plan.put("name", "plan-test");
plan.put("trial_days", 15);
Map<String, Object> plan_created = culqi.plan.create(plan);
```

#### Create Client

```java
Map<String, Object> customer = new HashMap<String, Object>();
customer.put("address","Av Lima 123");
customer.put("address_city","Lima");
customer.put("country_code","PE");
customer.put("email","[email protected]");
customer.put("first_name","Test");
customer.put("last_name","Cuqli");
customer.put("phone_number",99004356);
Map<String, Object> customer_created = culqi.customer.create(customer);
```

#### Create Card

```java
Map<String, Object> card = new HashMap<String, Object>();
card.put("customer_id",customer_created.get("id").toString());
card.put("token_id",token_created.get("id").toString());
Map<String, Object> card_created = culqi.card.create(card);
```


#### Create Subscription

```java
Map<String, Object> subscription = new HashMap<String, Object>();
subscription.put("card_id",card_created.get("id").toString());
subscription.put("plan_id",plan_created.get("id").toString());
Map<String, Object> suscription_created = culqi.subscription.create(subscription);
```

#### Create Refund

```java
Map<String, Object> refund = new HashMap<String, Object>();
refund.put("amount",900);
refund.put("charge_id",charge_created.get("id").toString());
refund.put("reason",Reason.solicitud_comprador);
Map<String, Object> refund_created = culqi.refund.create(refund);
```

## Documentation
Do you need more info about integration `culqi-java` The complete documentation is in [https://culqi.com/docs/](https://culqi.com/docs/)


## Changelog

All changes in the version of this library are listed in [CHANGELOG](CHANGELOG).

## Dependence for the development

- [okhttp3](http://square.github.io/okhttp/)
- [Jackson Core Databind](https://github.com/FasterXML/jackson-databind/wiki)

## Build

```bash
mvn package -DskipTests
```

## Testing

You must have installed Maven to run the tests

```bash
mvn test
```

You can run these unit tests independently

```bash
mvn test -D test=CulqiCreateTest#test1ValidCreateToken
mvn test -D test=CulqiCreateTest#test2ValidCreateCharge
mvn test -D test=CulqiCreateTest#test3ValidCreatePlan
mvn test -D test=CulqiCreateTest#test4ValidCreateCustomer
mvn test -D test=CulqiCreateTest#test5ValidCreateCard
mvn test -D test=CulqiCreateTest#test6ValidCreateSubscription
mvn test -D test=CulqiCreateTest#test7ChargeCapture
```

## How install the Culqi's jar in a Maven project?

```bash
mvn install:install-file -Dfile={dir}/culqi-java-1.1.8.jar -DgroupId=com.culqi -DartifactId=culqi-java -Dversion={version} -Dpackaging=jar
```

The add the following dependency in the pom.xml

```xml
<dependency>
<groupId>com.culqi</groupId>
<artifactId>culqi-java</artifactId>
<version>{version}</version>
</dependency>
```

## Author

Willy Aguirre ([@marti1125](https://github.com/marti1125) - Team Culqi)

## License

The source code of culqi-java is distribuited under MIT License, check the file [LICENSE](https://github.com/culqi/culqi-java/blob/master/LICENSE).
29 changes: 19 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.culqi</groupId>
<artifactId>culqi-java</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
<packaging>jar</packaging>

<name>Culqi Java</name>
Expand Down Expand Up @@ -82,25 +82,34 @@
</distributionManagement>

<build>

<plugins>
<!-- any other plugins -->

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<!-- Run shade goal on package phase -->
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why shade?

</goals>
<configuration>
<transformers>
<!-- add Main-Class to manifest file -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.culqi.Culqi</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>

</plugins>

</build>

</project>
</project>
3 changes: 3 additions & 0 deletions src/main/java/com/culqi/Culqi.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ public class Culqi {

public Culqi() {}

public static void main(String[] args) {
}

}
1 change: 0 additions & 1 deletion src/main/java/com/culqi/apioperation/All.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.culqi.apioperation;

import java.util.List;
import java.util.Map;

/**
Expand Down
Loading