Skip to content

Commit

Permalink
Merge pull request #5 from realexpayments-developers/master
Browse files Browse the repository at this point in the history
Updated HPP URL for TLS 1.2, license and version number.
  • Loading branch information
RealexITSO authored Jan 25, 2017
2 parents 37d7fa3 + 94b4888 commit 0bfc82e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Pay and Shop Ltd t/a Realex Payments
Copyright (c) 2017 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
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Realex Payments Android SDK
# Realex Payments Android Library
You can find more information on how to use this SDK and sign up for a free Realex Payments sandbox account at https://developer.realexpayments.com

## Requirements

- Android 4.4+
- Android SDK 19 or later

## HPP SDK Installation
## HPP Library Installation

### Gradle users
Add this dependency to your project's build file:
```
compile "com.realexpayments.hpp.sdk:rxp-hpp-android:1.0"
compile "com.realexpayments.hpp.sdk:rxp-hpp-android:1.1"
```

### Maven users
Expand All @@ -20,22 +20,22 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.realexpayments.hpp.sdk</groupId>
<artifactId>rxp-hpp-android</artifactId>
<version>1.0</version>
<version>1.1</version>
</dependency>
```

### Manual

You can integrate the Realex Payments Android SDK into your project manually.
You can integrate the Realex Payments Android Library into your project manually.

- Download the the latest release from GitHub:

https://github.com/realexpayments/rxp-android/releases

- Add module 'rxp-hpp-android' into your project to use the HPP SDK.
- Add module 'rxp-hpp-android' into your project to use the HPP Library.
- If you want to use the card data validation library, add the module 'rxp-remote-android' into your project.

## Using the HPP SDK
## Using the HPP Library

### Instantiate

Expand All @@ -51,14 +51,14 @@ The HPP Manager requires three server URLs.

1) **Request Producer URL**: utilizing one of the Realex HPP server SDKs; this URL creates the necessary request JSON for the component using the shared secret stored on the server side.

2) **HPP URL**: the location where the component sends the encoded request. The default for live transactions is https://hpp.realexpayments.com/pay
2) **HPP URL**: the location where the component sends the encoded request. The default for live transactions is https://pay.realexpayments.com/pay

3) **Response Consumer URL**: utilizing one of the Realex HPP server SDKs; takes the encoded response received back from HPP checks the validity of the hash and decodes the response.

```
hppManager.setHppRequestProducerURL("http://myserver.com/hppRequestProducer");
hppManager.setHppURL("https://hpp.realexpayments.com/pay";
hppManager.setHppResponseConsumerURL("http://myserver.com/hppResponseConsumer");
hppManager.setHppRequestProducerURL("https://myserver.com/hppRequestProducer");
hppManager.setHppURL("https://pay.realexpayments.com/pay";
hppManager.setHppResponseConsumerURL("https://myserver.com/hppResponseConsumer");
```

### Implement HPPManagerListener In Your Activity
Expand Down Expand Up @@ -130,9 +130,9 @@ As an option you could set properties by Bundle:

```
Bundle args = new Bundle();
args.putString(HPPManager.HPPREQUEST_PRODUCER_URL, "http://myserver.com/hppRequestProducer");
args.putString(HPPManager.HPPRESPONSE_CONSUMER_URL, "http://myserver.com/hppResponseProducer");
args.putString(HPPManager.HPPURL, "https://hpp.test.realexpayments.com/pay");
args.putString(HPPManager.HPPREQUEST_PRODUCER_URL, "https://myserver.com/hppRequestProducer");
args.putString(HPPManager.HPPRESPONSE_CONSUMER_URL, "https://myserver.com/hppResponseProducer");
args.putString(HPPManager.HPPURL, "https://pay.sandbox.realexpayments.com/pay");
args.putString(HPPManager.MERCHANT_ID, "realexsandbox");
args.putString(HPPManager.AMOUNT, "100");
args.putString(HPPManager.CURRENCY, "EUR");
Expand All @@ -145,7 +145,7 @@ hppManager = hppManager.createFromBundle(args);
Realex Payments maintain separate endpoints for live and test transactions. You’ll need to override the HPP URL in the SDK to facilitate testing. Use the code below:

```
hppManager.setHppURL("https://hpp.test.realexpayments.com/pay";
hppManager.setHppURL("https://pay.sandbox.realexpayments.com/pay";
```

## Remote API Validation Library Installation
Expand Down
4 changes: 2 additions & 2 deletions rxp-hpp-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.1"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
You set these three URLs as follows;
hppManager.setHppRequestProducerURL("http://myserver.com/HPP_Request_Producer.php");
hppManager.setHppRequestProducerURL("https://myserver.com/HPP_Request_Producer.php");
hppManager.setHppResponseConsumerURL("http://myserver.com/HPP_Response_Consumer.php"");
hppManager.setHppResponseConsumerURL("https://myserver.com/HPP_Response_Consumer.php"");
hppManager.setHppURL("https://hpp.test.realexpayments.com/pay";
hppManager.setHppURL("https://pay.sandbox.realexpayments.com/pay";
Set HPP Properties
Expand All @@ -45,7 +45,7 @@ public class HPPManager extends HPPResponse {

private String hppRequestProducerURL = "";
private String hppResponseConsumerURL = "";
private String hppURL = "https://hpp.realexpayments.com/pay";
private String hppURL = "https://pay.realexpayments.com/pay";

//Supplementary data to be sent to Realex Payments. This will be returned in the HPP response.
private HashMap<String, String> supplementaryData = new HashMap<String, String>();
Expand Down Expand Up @@ -113,9 +113,9 @@ public void setHppURL(String hppURL) {
*
Bundle args = new Bundle();
args.putString(HPPManager.HPPREQUEST_PRODUCER_URL, "http://myserver.com/HPP_Request_Producer.php");
args.putString(HPPManager.HPPRESPONSE_CONSUMER_URL, "http://myserver.com/HPP_Response_Consumer.php");
args.putString(HPPManager.HPPURL, "https://hpp.test.realexpayments.com/pay");
args.putString(HPPManager.HPPREQUEST_PRODUCER_URL, "https://myserver.com/HPP_Request_Producer.php");
args.putString(HPPManager.HPPRESPONSE_CONSUMER_URL, "https://myserver.com/HPP_Response_Consumer.php");
args.putString(HPPManager.HPPURL, "https://pay.sandbox.realexpayments.com/pay");
args.putString(HPPManager.MERCHANT_ID, "realexsandbox");
args.putString(HPPManager.AMOUNT, "100");
args.putString(HPPManager.CURRENCY, "EUR");
Expand Down

0 comments on commit 0bfc82e

Please sign in to comment.