Skip to content

Commit

Permalink
Merge branch 'master' into preauthcaptureapi-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyansh Pandey committed Aug 24, 2020
2 parents 0e3a6e0 + 2ddc686 commit 1808c18
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -101,6 +101,7 @@ cmake-build-debug/
## Plugin-specific files:

# IntelliJ
.idea/
/out/

# mpeltonen/sbt-idea plugin
Expand Down
29 changes: 14 additions & 15 deletions README.md
@@ -1,49 +1,49 @@
PayPay SDK JAVA
# PayPay SDK - JAVA

[![License](https://img.shields.io/:license-apache-orange.svg)](https://opensource.org/licenses/Apache-2.0)
[![Build Status](https://travis-ci.org/paypay/paypayopa-sdk-java.svg?branch=master)](https://travis-ci.org/paypay/paypayopa-sdk-java)
[![Coverage Status](https://coveralls.io/repos/github/paypay/paypayopa-sdk-java/badge.svg?branch=master)](https://coveralls.io/github/paypay/paypayopa-sdk-java?branch=master)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/paypay/paypayopa-sdk-java.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/paypay/paypayopa-sdk-java/context:java)

Java SDK for interacting with the Paypay APIs
This is the quickest way to integrate PayPay payment services. This is primarily meant for merchants who wish to perform interactions with the Paypay API programatically.
Java SDK for interacting with PayPay APIs

This is the quickest way to integrate PayPay payment services. This is primarily meant for merchants who wish to perform interactions with PayPay API programmatically.
With PayPay's OPA SDK, you can build a custom Payment checkout process to suit your unique business needs and branding guidelines.

## Integrating with PayPay OPA

## Prerequisites
Before integrating with the SDK, run through this checklist:
- [*] Understand the payment flow
- [*] Sign up for a PayPay developer/merchant Account
- [*] Generate the API keys from the Developer Panel. Use the sandbox API Keys to test out the integration

## HMAC Signature Verification
Signature verification is a mandatory step to ensure that the callback is sent by PayPay and the payment is received from an authentic source.
### Generate a Signature
The PayPay signature, returned to you by the Checkout form on successful payment, can be regenerated by your system and verified as follows:

Step 1: Hash the body and content-type with MD5 algorithm
Note : If there is no request body, for instance, the HTTP GET method case, no need of generating MD5. Instead hash value is set as "empty".

Note : If there is no request body, for instance, the HTTP GET method case, no need of generating MD5. Instead, hash value is set as "empty".
The value of authHeader is passed in HttpHeader.AUTHORIZATION. With the authHeader will decode back the data added and with the HTTP request object and based on data available for api-key in the system,
we will recreate the SHA256("key", requestParams) which gives macData. This macData is verified against the value passed in the header.
Note: Hmac authorization will be done internally by the SDK, the client need not worry about it.

## Requirements
Note: HMAC authorization will be done internally by the SDK, so client don't need to worry about it.

## Requirements
Building the API client library requires Gradle to be installed.

## Installation

Add this dependency to your project's build.gradle file:

```groovy
compile "jp.ne.paypay:paypayopa:0.3.0"
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following Java code:

```
Please refer jp.ne.paypay.example.PaymentApiExample.java for usage of APIs
```
> Please refer jp.ne.paypay.example.PaymentApiExample.java for usage of APIs
You need to setup your key and secret using the following:

Expand All @@ -54,8 +54,8 @@ You need to setup your key and secret using the following:
apiClient.setApiSecretKey("YOUR_API_SECRET");
apiClient.setAssumeMerchant("YOUR_MERCHANT_KEY");
```
## Documentation for API Endpoints

## Documentation for API Endpoints
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PaymentApi* | [**createAccountLinkQRCode**](docs/PaymentApi.md#createAccountLinkQRCode) | **POST** /v1/qr/sessions | Create an ACCOUNT LINK QR and display it to the user
Expand All @@ -76,7 +76,6 @@ Class | Method | HTTP request | Description
*UserApi* | [**unlinkUser**](docs/UserApi.md#unlinkUser) | **DELETE** /v2/user/authorizations/{userAuthorizationId} | Unlink user

## Documentation for Models

- [Capture](docs/Capture.md)
- [CaptureObject](docs/CaptureObject.md)
- [PaymentDetails](docs/PaymentDetails.md)
Expand Down

0 comments on commit 1808c18

Please sign in to comment.