https://github.com/kanryu/paypay_uo
paypay_uo (PayPay Unofficial) is a client library for PayPay's Open Payment API (OPA) faithfully ported from paypayopa-sdk-php
https://github.com/kanryu/paypay_uo
dart flutter payment paypay rest-api
Last synced: about 1 year ago
JSON representation
paypay_uo (PayPay Unofficial) is a client library for PayPay's Open Payment API (OPA) faithfully ported from paypayopa-sdk-php
- Host: GitHub
- URL: https://github.com/kanryu/paypay_uo
- Owner: kanryu
- License: apache-2.0
- Created: 2023-05-11T13:38:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-06T04:06:59.000Z (over 2 years ago)
- Last Synced: 2025-02-10T03:26:52.585Z (over 1 year ago)
- Topics: dart, flutter, payment, paypay, rest-api
- Language: Dart
- Homepage:
- Size: 81.1 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# paypay_uo
paypay_uo (PayPay Unofficial) is a client library for PayPay's Open Payment API (OPA) faithfully ported from paypayopa-sdk-php
Dart 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.
## SDK
PayPay SDK https://developer.paypay.ne.jp/miniapp/docs/apireference/commonSpecs
## 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
## Features
APIs implemented:
- Cashback
- QR Code
- Payment
- User
- Wallet
## Usage
Check out the Examples and API docs
```dart
import 'package:paypay_uo/paypay_uo.dart';
void main() async {
/// from your developer account
final apiKey = 'YOUR API KEY';
final apiSecret = 'YOUR API SECRET';
final assumeMerchant = 'YOUR ASSUME MERCHANT';
final auth = PayPayAuth(
merchantId: assumeMerchant, apiSecret: apiSecret, apiKey: apiKey);
final client = PayPayClient(apiMode: ApiMode.staging, auth: auth);
final payload = CreateQrCodePayload(
merchantPaymentId: PayPayClient.getTestMerchantPaymentId(),
amount: Amount(amount: 1, currency: 'JPY'),
codeType: 'ORDER_QR',
requestedAt: PayPayClient.getRequestedAt(),
orderItems: [
OrderItem(
name: "Cake",
quantity: 1,
unitPrice: Amount(amount: 20, currency: 'JPY'))
],
redirectType: "WEB_LINK",
redirectUrl: "http://foobar.com",
);
final response = await client.codeApi.createQRCode(payload);
print(response.statusCode);
print(response.body);
ApiResult result = PayPayClient.convertResponseToApiResult(response);
print(result.resultInfo.code);
}
```
## Logger
It supports log output by Logger.
By default, execution of PayPay API and its result are output.
Specifying Level.debug or Level.verbose will output more detailed information.
# License
Apache License Version 2.0
# Author
Copyright 2023 KATO Kanryu(k.kanryu@gmail.com)
## Additional information
Please raise issues on GitHub. Pull requests always welcome.
[](https://opensource.org/licenses/Apache-2.0)
[](https://coveralls.io/github/kanryu/paypay_uo)
[](https://codeclimate.com/github/kanryu/paypay_uo/maintainability)
[](https://copilot.blackducksoftware.com/github/repos/kanryu/paypay_uo/branches/master)
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fpaypay%2Fpaypayopa-sdk-php?ref=badge_shield)
[](https://sonarcloud.io/dashboard?id=paypay_paypayopa-sdk-php)
[](https://app.codacy.com/gh/kanryu/paypay_uo/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://bettercodehub.com/)