सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Flutter Fawry Pay एक Flutter प्लगइन है जो FawryPay के मूल भुगतान SDK को Flutter एप्लिकेशन में एम्बेड करता है, जिससे Android, iOS और वेब पर बिना किसी दिक्कत के अंदर ऐप भुगतान संभव होता है। यह डेवलपर्स को मिस्र और अन्य समर्थित क्षेत्रों में लेनदेन के लिए FawryPay के सुरक्षित भुगतान गेटवे का उपयोग करने की अनुमति देता है। इस प्लगइन के माध्यम से भुगतान शुरू करना, कॉलबैक का निपटारा करना और लेनदेन स्थिति का प्रबंधन करना सरल हो जाता है। यह FawryPay की मौजूदा बुनियादी ढांचे के साथ काम करने के लिए डिज़ाइन किया गया है, जिससे उनके नवीनतम सुरक्षा और भुगतान मानकों के साथ सुगमता सुनिश्चित होती है।
उपयोग
ईजिप्टी मार्केटप्लेस में ऐप भीतर के खरीदारी
FawryPay स्वीकार करने वाले ई-कॉमर्स प्लेटफॉर्म
स्थानीय भुगतान एकीकरण की आवश्यकता वाले मोबाइल ऐप्स
डिजिटल सेवा सदस्यता
ऑनलाइन बिल भुगतान
मुख्य विशेषताएँ
Android, iOS और Web प्लेटफॉर्म का समर्थन करता है
FawryPay SDK के साथ सुरक्षित एकीकरण
भुगतान कॉलबैक और स्थिति अपडेट का हैंडल करता है
लेनदेन शुरू करने के लिए सरल API
एम्बेडेड त्रुटि हैंडलिंग और लॉगिंग
इनके लिए उपयुक्त
मिस्री उपयोगकर्ताओं के लिए विकासकर्ता
FawryPay के रूप में भुगतान विधि की आवश्यकता वाले ऐप्स
Flutter का उपयोग करके क्रॉस-प्लेटफॉर्म एप्लिकेशन
ई-कॉमर्स और सब्सक्रिप्शन सेवाएं
स्थानीय भुगतान गेटवे की आवश्यकता वाले प्रोजेक्ट
विचार योग्य बातें
FawryPay खाता और प्रमाणपत्र की आवश्यकता होती है
FawryPay के संचालित क्षेत्रों तक सीमित
प्रत्येक प्लेटफॉर्म के लिए सही विन्यास की आवश्यकता होती है
अतिरिक्त बैकएंड सत्यापन की आवश्यकता हो सकती है
नए फीचर्स के लिए FawryPay SDK अपडेट पर निर्भर करता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Flutter FawryPay
Explain
This plugin is for FawryPay. It's implemented the native SDKs of Mobile, and Web to work on Flutter environment.
It works for Android fine. iOS works fine on Real Device only (FawryPay Requirements).
FlutterFawryPay.instance.init(
// Set the merchant ID here for one time only.
merchantID: Keys.merchantID,
style: Style.STYLE1,
// If set to true, you must set username and email.
skipCustomerInput: true,
// Must be a phone number.
username: "01234567890",
email: "abc@test.com",
// For web how you show the Fawry screen.
webDisplayMode: DisplayMode.SIDE_PAGE,
// You should set environment here.
environment: Environment.TEST,
);
And when you are ready for production you have to set the environment to LIVE.
Now, you can stream the result data that from SDK.
Let's now make our first payment initialize, you must set your merchantID that token from FawryPay system, and set your FawryItems that the user will pay for.
Note that: there's error in native FawryPay SDK for Android and iOS to retrieve again customParam.
FlutterFawryPay.instance.initialize(
returnUrl: "test.com", // For Web use only.
items: [
FawryItem(sku: "1", description: "Item 1", qty: 1, price: 20.0),
],
customParam: {
"order_id": "123213",
"price": 231.0,
},
);
You can set some parameters like: merchantRefNumber, customParam.
So now, it was initialized well, how to start payment? You have TWO ways.
First way: Native Fawry Button
You can use the native button for FawryPay SDK. through this only widget.
FawryButton()
Second way: Your custom widget
You can use your own widget with a function to call with FlutterFawryPay.instance.startProcess().
Last function you can use is reset the initialization (Android & Web only), doing that:
FlutterFawryPay.instance.reset();
Objects
classFawryItem{
String sku;
String description;
int qty;
double price;
double? originalPrice;
int? height;
int? length;
double? weight;
int? width;
String? variantCode;
List<String>? reservationCodes;
String? earningRuleID;
String? imageUrl; // For Web only.
}
classFawryResponse{
/// Parameters for payment process.String transactionID;
DateTime expiryDate;
/// Parameters for card tokenizer process.String cardToken;
DateTime creationDate;
String lastFourDigits;
/// Common parameters for all process.Map<String, dynamic> customParam;
String errorMessage;
}
Enums
/// Enums for DisplayMode configuration.////// [POPUP] show a popup dialog./// [SIDE_PAGE] show side screen dialog.enumDisplayMode { POPUP, SIDE_PAGE }
/// Enums for Environment configuration.////// [TEST] for test stage atfawry.fawrystaging endpoint./// [LIVE] for production stage atfawry endpoint.enumEnvironment { TEST, LIVE }
/// Enums for Environment configuration.////// [EN] for English language./// [AR] for Arabic language.enumLanguage { EN, AR }
/// Enums for Environment configuration.////// [STYLE1] for first styling./// [STYLE2] for second styling.enumStyle { STYLE1, STYLE2 }
Copyright (c) 2021 Shady Boshra. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.