Skip to content

Commit

Permalink
Merge pull request #2 from realexpayments-developers/master
Browse files Browse the repository at this point in the history
SDK v1.0
  • Loading branch information
RealexITSO committed Jun 26, 2015
2 parents b8e7c48 + b1d2668 commit afda01d
Show file tree
Hide file tree
Showing 52 changed files with 8,189 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/target/
.classpath
.project
/.settings/
.springBeans
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Pay and Shop Ltd t/a Realex Payments

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
# rxp-remote-java
The official Realex Payments Remote Java SDK.
.
# Realex Remote Java SDK
You can sign up for a Realex account at https://www.realexpayments.com.
## Requirements
Java 1.6 and later.
## Installation
### Maven users
Add this dependency to your project's POM:
```xml
<dependency>
<groupId>com.realexpayments.remote.sdk</groupId>
<artifactId>rxp-remote-java</artifactId>
<version>1.0</version>
</dependency>
```

### Gradle users
Add this dependency to your project's build file:
```
compile "com.realexpayments.remote.sdk:rxp-remote-java:1.0"
```
##Usage
```
Card card = new Card()
.addExpiryDate("0119")
.addNumber("420000000000000000")
.addType(CardType.VISA)
.addCardHolderName("Joe Smith")
.addCvn(123)
.addCvnPresenceIndicator(PresenceIndicator.CVN_PRESENT);
PaymentRequest request = new PaymentRequest()
.addAccount("yourAccount")
.addMerchantId("yourMerchantId")
.addType(PaymentType.AUTH)
.addAmount(100)
.addCurrency("EUR")
.addCard(card)
.addAutoSettle(new AutoSettle().addFlag(AutoSettleFlag.TRUE));
RealexClient client = new RealexClient("shared secret");
PaymentResponse response = client.send(request);
```
##License
See the LICENSE file.
164 changes: 164 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.realexpayments.remote.sdk</groupId>
<artifactId>rxp-remote-java</artifactId>
<version>1.0</version>
<name>Realex Payments Remote Java SDK</name>
<description>The official Realex Payments Remote Java SDK</description>
<url>http://www.realexpayments.com</url>

<licenses>
<license>
<name>MIT License</name>
<url>https://github.com/realexpayments/rxp-remote-java/blob/master/LICENSE.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>Realex Developer</name>
<organization>Realex Payments</organization>
<organizationUrl>http://www.realexpayments.com</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:[email protected]:realexpayments/rxp-remote-java.git</connection>
<developerConnection>scm:git:[email protected]:realexpayments/rxp-remote-java.git</developerConnection>
<url>https://github.com/realexpayments/rxp-remote-java.git</url>
</scm>

<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<jaxb.version>2.1</jaxb.version>
<junit.version>4.12</junit.version>
<slf4j.version>1.7.12</slf4j.version>
<logback-classic.version>1.1.3</logback-classic.version>
<apache-commons-codec.version>1.10</apache-commons-codec.version>
<apache-httpcomponents-httpclient.version>4.4.1</apache-httpcomponents-httpclient.version>
<mockito.version>1.10.19</mockito.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>Development Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Releases</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${apache-httpcomponents-httpclient.version}</version>
<exclusions>
<exclusion>
<artifactId>commons-codec</artifactId>
<groupId>commons-codec</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${apache-commons-codec.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit afda01d

Please sign in to comment.