GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - shashi-pp/paypayopa-sdk-java: With PayPay's Payment SDK, you can build a custom Payment checkout process to suit your unique business needs and branding guidelines

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

294 Commits
294 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
gradle/wrapper
gradle/wrapper
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
DynamicQRCode.md
DynamicQRCode.md
 
 
LICENSE
LICENSE
 
 
PendingPayment.md
PendingPayment.md
 
 
PreAuthCapture.md
PreAuthCapture.md
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
build.gradle
build.gradle
 
 
contributing.md
contributing.md
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 
userAuth.md
userAuth.md
 
 

Repository files navigation

PayPay SDK - JAVA

License Maven Central javadoc Build Status Coverage Status Language grade: Java Black Duck Security Risk Maintainability FOSSA Status Snyk Vulnerabilities for GitHub Repo Codacy Badge BCH compliance CII Best Practices

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". 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, 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:

compile "jp.ne.paypay:paypayopa:0.9.0"

Getting Started

Please follow the installation instruction and execute the following Java code:

Please refer jp.ne.paypay.example.* for usage of APIs

You need to set up your API key and secret using the following:

    ApiClient apiClient = new Configuration().getDefaultApiClient();
    apiClient.setProductionMode(false); //true for production and false for sandbox. Default is sandbox
    apiClient.setApiKey("YOUR_API_KEY");
    apiClient.setApiSecretKey("YOUR_API_SECRET");
    apiClient.setAssumeMerchant("YOUR_MERCHANT_KEY");

Documentation for API Endpoints

Title Method HTTP request Description
PaymentApi createAccountLinkQRCode POST /v1/qr/sessions Create an ACCOUNT LINK QR and display it to the user
PaymentApi cancelPayment DELETE /v2/payments/{merchantPaymentId} Cancel a payment
PaymentApi createPayment POST /v2/payments Create a payment
PaymentApi createPaymentAuthorization POST /v2/payments/preauthorize Create a payment authorization to block the money
PaymentApi createContinuousPayment POST /v1/subscription/payments Create a continuous payment and start the money transfer
PaymentApi revertAuth POST /v2/payments/preauthorize/revert Revert a payment authorization
PaymentApi capturePaymentAuth POST /v2/payments/capture Capture a payment authorization
PaymentApi createQRCode POST /v2/codes Create a Code
PaymentApi deleteQRCode DELETE /v2/codes/{codeId} Delete a Code
PaymentApi getPaymentDetails GET /v2/payments/{merchantPaymentId} Get payment details
PaymentApi getCodesPaymentDetails GET /v2/codes/payments/{merchantPaymentId} Get payment details for QR code
PaymentApi getRefundDetails GET /v2/refunds/{merchantRefundId} Get refund details
PaymentApi refundPayment POST /v2/refunds Refund a payment
PaymentApi createPendingPayment POST /v1/requestOrder Create a pending payment
PaymentApi getPaymentDetails GET /v1/requestOrder/{merchantPaymentId} Get payment details (Pending Payment)
PaymentApi cancelPendingOrder DELETE /v1/requestOrder/{merchantPaymentId} Cancel a Pending Order
PaymentApi getRefundDetails GET /v2/refunds/{merchantRefundId} Get refund details (Pending Payment)
PaymentApi refundPayment POST /v1/requestOrder/refunds Refund a payment (Pending Payment)
WalletApi checkWalletBalance GET /v2/wallet/check_balance Check user wallet balance
UserApi getMaskedUserProfile GET /v2/user/profile/secure?userAuthorizationId={userAuthorizationId} Get masked user profile
UserApi getUserAuthorizationStatus GET /v2/user/authorizations?userAuthorizationId={userAuthorizationId} Get user authorization status
UserApi unlinkUser DELETE /v2/user/authorizations/{userAuthorizationId} Unlink user

Documentation for Models

  • Capture
  • CaptureObject
  • PaymentDetails
  • RefundDetails
  • WalletBalance
  • BalanceData
  • QRCodeDetails
  • MerchantOrderItem
  • MerchantOrderItemResponse
  • MoneyAmount
  • NotDataResponse
  • Payment
  • PaymentDetails
  • PaymentMethodDetails
  • PaymentMethodListDetails
  • PaymentOrder
  • PaymentOrderDetails
  • PaymentState
  • PaymentStateCaptures
  • PaymentStateRefunds
  • PaymentStateRevert
  • ProductType
  • QRCode
  • QRCodeResponse
  • Refund
  • RefundOrder
  • RefundState
  • ResultInfo
  • AccountLinkQRCode

License

FOSSA Status

About

With PayPay's Payment SDK, you can build a custom Payment checkout process to suit your unique business needs and branding guidelines

developer.paypay.ne.jp/

Resources

Readme
Apache-2.0 license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.