cloudpayments
Android 및 iOS 애플리케이션에서 Cloudpaymanets를 통합하기 위한 플러터 플러그인입니다.
shushper/cloudpayments open-source repository details.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A Flutter plugin for integrating Cloudpaymanets in Android and iOS applications.
Disclaimer: It is not an official plugin. It uses SDK-Android on Android and SDK-IOS on iOS. Also this plugin doesn't send any requests to Cloudpayments API. In order to make purchases you have to implment some logic on your server.
Steps to make purchase:
See the official documentation:
If you want to show 3ds dialog on Android, make MainActivity implements FlutterFragmentActivity instead of FlutterActivity
android/app/src/main/.../MainActivity.kt:
import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() {}
bool isValid = await Cloudpayments.isValidNumber(cardNumber);
bool isValid = await Cloudpayments.isValidExpireDate(cardNumber); // MM/yy
final cryptogram = await Cloudpayments.cardCryptogram(cardNumber, expireDate, cvcCode, publicId);
final result = await Cloudpayments.show3ds(acsUrl, transactionId, paReq);
final applePay = CloudpaymentsApplePay();
final isApplePayAvailable = await applePay.isApplePayAvailable();
final paymentToken = await applePay.requestApplePayPayment(
merchantId: 'merchant.com.YOURDOMAIN',
currencyCode: 'RUB',
countryCode: 'RU',
products: [
{"name": "Red apple", "price": "170"},
{"name": "Mango", "price": "250.50"},
{"name": "Delivery", "price": "100"},
{"name": "Discount", "price": "-89.90"},
{"name": "Total", "price": "430.60"},
],
);
Now you can use paymentToken for payment by a cryptogram.
final googlePay = CloudpaymentsGooglePay(GooglePayEnvironment.production);
final isGooglePayAvailable = await googlePay.isGooglePayAvailable();
final result = await googlePay.requestGooglePayPayment(
price: '430.6',
currencyCode: 'RUB',
countryCode: 'RU',
merchantName: 'Example Merchant',
publicId: 'test_api_00000000000000000000002',
);
if (result != null) {
if (result.isSuccess) {
final paymentToken = result.token;
}
}
Now you can use paymentToken for payment by a cryptogram.
의존성 목록 2 개
{"sdk":"flutter"}{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗