Download the PHP package paypayopa/php-sdk without Composer
On this page you can find all versions of the php package paypayopa/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-sdk
Paypay SDK - PHP
PHP Class for interacting with the Paypay API This is the quickest way to integrate PayPay payment services, primarily meant for merchants who wish to perform interactions with the Paypay API programatically. 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's Open Payment API (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
Minimum required software requirements
To use the Paypay OPA PHP SDK you need:
- A server compute environment (local machines, docker containers, VPS or dedicated servers, cloud infrastructure etc. )
- A web server to serve your API responses and html documents.
- PHP version 7.x interpreter to execute your backend code.
- Composer to manage your dependencies(recommended) or a release version from this repo to manually maintain your dependencies.
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 on successful payment, can be generated by your system and verified as follows:
- Start by hashing 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. The authHeader will decode back to 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.
For the complete step-by-step explanation refer the link here
Composer
To install the bindings via Composer, run the following command in your shell :
Getting Started
You need to setup your key and secret using the following:
[Note:] Setter chaining in request payload classes
In the examples below methods are written one after the other for the sake of your understanding. However you can save a few keystrokes by chaining multiple setter functions like so:
Dynamic QR Code
Create a dynamic QR Code to receive payments.
For a list of params refer to the API guide :
https://www.paypay.ne.jp/opa/doc/v1.0/dynamicqrcode#operation/createQRCode
Delete a particular Dynamic QR Code
Fetch a particular QR CODE payment detail
Cancel a payment
Get User Authorization URL
Decode user authorization from token
The PayPay authorization system will redirect user back to your site with a JWT token in the responseToken
URL parameter.
Capture payment details
For a list of params refer to the API guide :
https://www.paypay.ne.jp/opa/doc/v1.0/dynamicqrcode#operation/capturePaymentAuth
Fetch a particular Direct Debit payment detail
Revert payment
For a list of params refer to the API guide :
https://www.paypay.ne.jp/opa/doc/v1.0/dynamicqrcode#operation/revertAuth
Refund payment
For a list of params refer to the API guide :
https://www.paypay.ne.jp/opa/doc/v1.0/dynamicqrcode#operation/refundPayment
Fetch refund status and details
For a list of params refer to the API guide :
https://www.paypay.ne.jp/opa/doc/v1.0/dynamicqrcode#operation/getRefundDetails
License
All versions of php-sdk with dependencies
ext-json Version *
firebase/php-jwt Version ^5.5 || ^6.0
guzzlehttp/guzzle Version ^6.0 || ^7.0