HyperPay 플러그인은 모바일 애플리케이션에 HyperPay 엔드투엔드 결제 게이트웨이를 원활하게 통합할 수 있도록 해주는 Flutter/Dart 패키지입니다. Android 및 iOS용으로 설계되어, 최소한의 설정으로 안전하고 신뢰할 수 있는 결제 처리를 간편하게 추가할 수 있습니다. 이 플러그인은 거래, 토큰화, 결제 확인을 처리하기 위한 간단한 API를 제공하여 원활한 체크아웃 경험을 보장합니다. 단일 인터페이스를 통해 다양한 결제 수단을 지원하려는 개발자에게 이상적입니다. HyperPay 플랫폼의 공식 지원을 통해 산업 표준 준수와 실시간 거래 추적을 보장합니다.
사용 사례
앱 내 구매
전자상거래 체크아웃
모바일 지갑 통합
구독 결제
디지털 서비스용 결제 처리
주요 기능
크로스 플랫폼 지원 (Android 및 iOS)
안전한 결제 토큰화
HyperPay 게이트웨이와의 간편한 통합
실시간 거래 상태
다양한 결제 수단 지원
적합한 대상
전자상거래 앱을 구축하는 플러터 개발자
빠른 결제 통합이 필요한 스타트업
다국화 지원이 필요한 앱
HyperPay를 결제 제공업체로 사용하는 개발자
엄격한 보안 및 준수 요구 사항이 있는 프로젝트
고려 사항
HyperPay 계정 및 API 자격 증명이 필요합니다
HyperPay가 지원하는 지역에 한정
외부 게이트웨이의 안정성에 의존
오류 상태에 대한 적절한 처리가 필요합니다
고급 기능을 사용하려면 추가 구성이 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
HyperPay SDK Plugin
The HyperPay platform offers a complete, easy-to-use guide to enable seamless integration of our end-to-end payment gateway for mobile and desktop browsers. Through a unified API, you can enable and gain access to all platform features. Choose one of the options below to quickly get started
Support ReadyUI , CustomUI
VISA,MasterCard
STC
Apple Pay
MADA( Saudi Arabia )
Android Setup
Open android/app/build.gradle and add the following lines
shopperResultUrl since mSDK version 6.0.0 the shopper result URL is not required
The Scheme field must match the InAppPaymentSetting.shopperResultUrl field.
Don't make Scheme like com.testPayment.Payment avoid capital letters in Android.
It's used when making a payment outside the app (Like open browser) and back into the app
IOS Setup
Open Podfile, and paste the following inside of it:
pod 'hyperpay_sdk', :git => 'https://github.com/ahmedelkhyary/hyperpay_sdk.git'
$static_framework = ['hyperpay_plugin']
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if $static_framework.include?(pod.name)
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end
Add Url Scheme to the list of bundle identifiers.
The Url Scheme field must match the InAppPaymentSetting.shopperResultUrl field.
Setup HyperPay Environment Configuration
define instanse of FlutterHyperPay
lateFlutterHyperPay flutterHyperPay ;
flutterHyperPay = FlutterHyperPay(
shopperResultUrl: InAppPaymentSetting.shopperResultUrl, // return back to app
paymentMode: PaymentMode.test, // test or live
lang: InAppPaymentSetting.getLang(),
);
create a method to get the checkoutId
/// URL TO GET CHECKOUT ID FOR TEST /// THIS LINK UNAVAILABLE NOW/// http://dev.hyperpay.com/hyperpay-demo/getcheckoutid.php/// Brands Names [ VISA , MASTER , MADA , STC_PAY , APPLEPAY]getCheckOut() async {
final url = Uri.parse('https://dev.hyperpay.com/hyperpay-demo/getcheckoutid.php');
final response = await http.get(url);
if (response.statusCode == 200) {
payRequestNowReadyUI(
checkoutId: json.decode(response.body)['id'],
brandsName: [ "VISA" , "MASTER" , "MADA" ,"PAYPAL", "STC_PAY" , "APPLEPAY"]);
}else{
dev.log(response.body.toString(), name: "STATUS CODE ERROR");
}
}
If you want using readyUI send checkoutId and List of brandsName to Plugin
Brands Names support [ VISA , MASTER , MADA , STC_PAY , APPLEPAY]
payRequestNowReadyUI(
{requiredList<String> brandsName, requiredString checkoutId}) async {
PaymentResultData paymentResultData;
paymentResultData = await flutterHyperPay.readyUICards(
readyUI: ReadyUI(
brandsName: brandsName ,
checkoutId: checkoutId,
merchantIdApplePayIOS: InAppPaymentSetting.merchantId, // applepay
countryCodeApplePayIOS: InAppPaymentSetting.countryCode, // applePay
companyNameApplePayIOS: "Test Co", // applePay
themColorHexIOS: "#000000" ,// FOR IOS ONLY
setStorePaymentDetailsMode: true// store payment details for future use
),
);
}
classInAppPaymentSetting{
// shopperResultUrl : this name must like scheme in intent-filter, url scheme in xcode// Avoid capital letters like `com.testPayment.Payment`, as it will not work in Android.staticconstString shopperResultUrl= "com.testpayment.payment";
staticconstString merchantId= "MerchantId";
staticconstString countryCode="SA";
staticgetLang() {
if (Platform.isIOS) {
return"en"; // ar
} else {
return"en_US"; // ar_AR
}
}
}