├── ios ├── Assets │ └── .gitkeep ├── Classes │ ├── FlutterRavepayPlugin.h │ ├── FlutterRavepayPlugin.m │ └── SwiftFlutterRavepayPlugin.swift ├── .gitignore └── flutter_ravepay.podspec ├── android ├── gradle.properties ├── settings.gradle ├── .settings │ └── org.eclipse.buildship.core.prefs ├── .gitignore ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .classpath ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── io │ │ └── github │ │ └── jogboms │ │ └── flutterravepay │ │ └── FlutterRavepayPlugin.java ├── .project ├── build.gradle ├── gradlew.bat └── gradlew ├── example ├── android │ ├── gradle.properties │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── app │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── src │ │ │ └── main │ │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── gen │ │ │ │ └── ng │ │ │ │ │ └── i │ │ │ │ │ └── handikraft │ │ │ │ │ └── flutterravepayexample │ │ │ │ │ ├── R.java │ │ │ │ │ ├── Manifest.java │ │ │ │ │ └── BuildConfig.java │ │ │ │ ├── java │ │ │ │ └── ng │ │ │ │ │ └── i │ │ │ │ │ └── handikraft │ │ │ │ │ └── flutterravepayexample │ │ │ │ │ └── MainActivity.java │ │ │ │ └── AndroidManifest.xml │ │ ├── .classpath │ │ ├── .project │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── .project │ ├── settings.gradle │ ├── build.gradle │ ├── gradlew.bat │ └── gradlew ├── ios │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ ├── Info.plist │ │ └── AppDelegate.swift │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ └── project.pbxproj │ ├── Runner.xcworkspace │ │ └── contents.xcworkspacedata │ ├── .gitignore │ ├── Podfile.lock │ └── Podfile ├── .gitignore ├── README.md ├── pubspec.yaml ├── .metadata ├── .vscode │ └── launch.json ├── flutter_ravepay_example.iml ├── flutter_ravepay_example_android.iml └── lib │ └── main.dart ├── CHANGELOG.md ├── screenshots ├── ios.png └── android.png ├── .gitignore ├── .idea ├── vcs.xml └── codeStyles │ └── Project.xml ├── lib ├── src │ ├── meta.dart │ ├── card.dart │ ├── config.dart │ └── result.dart └── flutter_ravepay.dart ├── pubspec.yaml ├── flutter_ravepay.iml ├── LICENSE ├── flutter_ravepay_android.iml ├── README.md └── analysis_options.yaml /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'flutter_ravepay' 2 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.2.0] - 11/07/2018. 2 | 3 | - Initial Pub release 4 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /screenshots/ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/screenshots/ios.png -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /screenshots/android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/screenshots/android.png -------------------------------------------------------------------------------- /example/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /example/android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu May 17 23:57:19 WAT 2018 2 | connection.project.dir=.. 3 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | 9 | .flutter-plugins 10 | .idea/ 11 | -------------------------------------------------------------------------------- /ios/Classes/FlutterRavepayPlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface FlutterRavepayPlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | pubspec.lock 7 | 8 | build/ 9 | /.idea/workspace.xml 10 | /.idea/libraries 11 | 12 | ios/.generated/ 13 | packages 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SnowStar0423/flutter_ravepay/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # flutter_ravepay_example 2 | 3 | Demonstrates how to use the flutter_ravepay plugin. 4 | 5 | ## Getting Started 6 | 7 | For help getting started with Flutter, view our online 8 | [documentation](https://flutter.io/). 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_ravepay_example 2 | description: Demonstrates how to use the flutter_ravepay plugin. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | flutter_ravepay: 8 | path: ../ 9 | 10 | flutter: 11 | uses-material-design: true 12 | -------------------------------------------------------------------------------- /example/android/app/src/main/gen/ng/i/handikraft/flutterravepayexample/R.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package ng.i.handikraft.flutterravepayexample; 4 | 5 | /* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ 6 | public final class R { 7 | } -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 15 14:37:51 WAT 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/gen/ng/i/handikraft/flutterravepayexample/Manifest.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package ng.i.handikraft.flutterravepayexample; 4 | 5 | /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ 6 | public final class Manifest { 7 | } -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 44b7e7d3f42f050a79712daab253af06e9daf530 8 | channel: beta 9 | -------------------------------------------------------------------------------- /ios/Classes/FlutterRavepayPlugin.m: -------------------------------------------------------------------------------- 1 | #import "FlutterRavepayPlugin.h" 2 | #import 3 | 4 | @implementation FlutterRavepayPlugin 5 | + (void)registerWithRegistrar:(NSObject*)registrar { 6 | [SwiftFlutterRavepayPlugin registerWithRegistrar:registrar]; 7 | } 8 | @end 9 | -------------------------------------------------------------------------------- /lib/src/meta.dart: -------------------------------------------------------------------------------- 1 | class RavepayMeta { 2 | final String metaname; 3 | final String metavalue; 4 | 5 | const RavepayMeta( 6 | this.metaname, 7 | this.metavalue, 8 | ); 9 | 10 | Map toMap() { 11 | return { 12 | "metaname": metaname, 13 | "metavalue": metavalue, 14 | }; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /android/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/gen/ng/i/handikraft/flutterravepayexample/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package ng.i.handikraft.flutterravepayexample; 4 | 5 | /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ 6 | public final class BuildConfig { 7 | public final static boolean DEBUG = Boolean.parseBoolean(null); 8 | } -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/ng/i/handikraft/flutterravepayexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package ng.i.handikraft.flutterravepayexample; 2 | 3 | import android.os.Bundle; 4 | 5 | import io.flutter.app.FlutterActivity; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | GeneratedPluginRegistrant.registerWith(this); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_ravepay 2 | description: Flutter integration for Flutterwave's Rave payment platform. 3 | version: 0.2.1 4 | author: Jeremiah Ogbomo 5 | homepage: https://github.com/jogboms/flutter_ravepay 6 | 7 | flutter: 8 | plugin: 9 | androidPackage: io.github.jogboms.flutterravepay 10 | pluginClass: FlutterRavepayPlugin 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | 16 | environment: 17 | sdk: ">=2.0.0-dev.58.0 <3.0.0" 18 | flutter: ">=0.5.1 <2.0.0" 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /example/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Flutter", 9 | "type": "dart", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/lib/main.dart" 12 | }, 13 | { 14 | "name": "Flutter", 15 | "request": "launch", 16 | "type": "dart" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /ios/Classes/SwiftFlutterRavepayPlugin.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | public class SwiftFlutterRavepayPlugin: NSObject, FlutterPlugin { 5 | public static func register(with registrar: FlutterPluginRegistrar) { 6 | let channel = FlutterMethodChannel(name: "ng.i.handikraft/null", binaryMessenger: registrar.messenger()) 7 | let instance = SwiftFlutterRavepayPlugin() 8 | registrar.addMethodCallDelegate(instance, channel: channel) 9 | } 10 | 11 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 12 | result(["message": "I Love flutter"]); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.0.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /example/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | flutter_ravepay 4 | Project flutter_ravepay created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | .symlinks -------------------------------------------------------------------------------- /ios/flutter_ravepay.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'flutter_ravepay' 6 | s.version = '0.0.1' 7 | s.summary = 'A new flutter plugin project.' 8 | s.description = <<-DESC 9 | A new flutter plugin project. 10 | DESC 11 | s.homepage = 'http://example.com' 12 | s.license = { :file => '../LICENSE' } 13 | s.author = { 'Your Company' => 'email@example.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'Classes/**/*' 16 | s.public_header_files = 'Classes/**/*.h' 17 | s.dependency 'Flutter' 18 | s.ios.deployment_target = '10.0' 19 | end 20 | 21 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'ng.i.handikraft.flutterravepay' 2 | version '1.0-SNAPSHOT' 3 | 4 | buildscript { 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.0.1' 12 | } 13 | } 14 | 15 | rootProject.allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | maven { url 'https://jitpack.io' } 20 | } 21 | } 22 | 23 | apply plugin: 'com.android.library' 24 | 25 | android { 26 | compileSdkVersion 27 27 | 28 | defaultConfig { 29 | minSdkVersion 16 30 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 31 | } 32 | lintOptions { 33 | disable 'InvalidPackage' 34 | } 35 | } 36 | 37 | dependencies { 38 | implementation 'com.github.Flutterwave:rave-android:1.0.18' 39 | } -------------------------------------------------------------------------------- /example/flutter_ravepay_example.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /flutter_ravepay.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Jeremiah Ogbomo 4 | 5 | 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: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | 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. 10 | -------------------------------------------------------------------------------- /lib/flutter_ravepay.dart: -------------------------------------------------------------------------------- 1 | library flutter_ravepay; 2 | 3 | import 'dart:async' show Future; 4 | import 'dart:convert'; 5 | 6 | import 'package:flutter/foundation.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter/services.dart'; 9 | import 'package:flutter_ravepay/src/config.dart'; 10 | import 'package:flutter_ravepay/src/result.dart'; 11 | 12 | export 'src/card.dart'; 13 | export 'src/config.dart'; 14 | export 'src/meta.dart'; 15 | export 'src/result.dart'; 16 | 17 | class Ravepay { 18 | BuildContext context; 19 | final String _channelName = 'ng.i.handikraft/flutter_ravepay'; 20 | 21 | Ravepay(this.context); 22 | 23 | Future chargeCard(RavepayConfig config) async { 24 | final bool isIos = Theme.of(context).platform == TargetPlatform.iOS; 25 | final MethodChannel _channel = new MethodChannel(_channelName); 26 | Map result; 27 | try { 28 | result = await _channel.invokeMethod('chargeCard', config.toMap()); 29 | // print(result); 30 | } on PlatformException { 31 | result = {"status": "CANCELLED"}; 32 | } 33 | return new RavepayResult( 34 | result["status"], 35 | result["payload"] != null 36 | ? (isIos ? result["payload"] : json.decode(result["payload"])) 37 | : null, 38 | ); 39 | } 40 | 41 | static Ravepay of(BuildContext context) { 42 | return new Ravepay(context); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/src/card.dart: -------------------------------------------------------------------------------- 1 | class RavepayCard { 2 | final String expirymonth; 3 | final String expiryyear; 4 | final String cardBIN; 5 | final String last4digits; 6 | final String brand; 7 | final List> cardTokens; 8 | final String lifeTimeToken; 9 | 10 | const RavepayCard({ 11 | this.expirymonth, 12 | this.expiryyear, 13 | this.cardBIN, 14 | this.last4digits, 15 | this.brand, 16 | this.cardTokens, 17 | this.lifeTimeToken, 18 | }); 19 | 20 | factory RavepayCard.fromMap(Map map) { 21 | return new RavepayCard( 22 | expirymonth: map["expirymonth"], 23 | expiryyear: map["expiryyear"], 24 | cardBIN: map["cardBIN"], 25 | last4digits: map["last4digits"], 26 | brand: map["brand"], 27 | cardTokens: _parseTokenList(map["card_tokens"]), 28 | lifeTimeToken: map["life_time_token"], 29 | ); 30 | } 31 | 32 | Map toMap() { 33 | return { 34 | "expirymonth": expirymonth, 35 | "expiryyear": expiryyear, 36 | "cardBIN": cardBIN, 37 | "last4digits": last4digits, 38 | "brand": brand, 39 | "cardTokens": cardTokens, 40 | "lifeTimeToken": lifeTimeToken, 41 | }; 42 | } 43 | } 44 | 45 | List> _parseTokenList(List tokens) { 46 | if (tokens == null) { 47 | return []; 48 | } 49 | 50 | return new List.from( 51 | tokens.map>( 52 | (dynamic token) => Map.from(token), 53 | ), 54 | ); 55 | } 56 | -------------------------------------------------------------------------------- /example/flutter_ravepay_example_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /flutter_ravepay_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 27 19 | 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | 24 | defaultConfig { 25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 26 | applicationId "ng.i.handikraft.flutterravepayexample" 27 | minSdkVersion 16 28 | targetSdkVersion 27 29 | versionCode 1 30 | versionName "1.0" 31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 32 | } 33 | 34 | buildTypes { 35 | release { 36 | // TODO: Add your own signing config for the release build. 37 | // Signing with the debug keys for now, so `flutter run --release` works. 38 | signingConfig signingConfigs.debug 39 | } 40 | } 41 | } 42 | 43 | flutter { 44 | source '../..' 45 | } 46 | 47 | dependencies { 48 | testImplementation 'junit:junit:4.12' 49 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 51 | } 52 | -------------------------------------------------------------------------------- /lib/src/config.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter_ravepay/src/meta.dart'; 3 | 4 | class RavepayConfig { 5 | final double amount; 6 | final String country; 7 | final String currency; 8 | final String email; 9 | final String firstname; 10 | final String lastname; 11 | final String narration; 12 | final String publicKey; 13 | final String secretKey; 14 | final String txRef; 15 | final bool useAccounts; 16 | final bool useCards; 17 | final bool isStaging; 18 | final bool useSave; 19 | final bool style; 20 | final List metadata; 21 | 22 | const RavepayConfig({ 23 | @required this.amount, 24 | @required this.country, 25 | @required this.currency, 26 | @required this.email, 27 | @required this.firstname, 28 | this.lastname = "", 29 | this.narration = "", 30 | @required this.publicKey, 31 | @required this.secretKey, 32 | @required this.txRef, 33 | this.metadata, 34 | this.useAccounts = true, 35 | this.useCards = true, 36 | this.isStaging = true, 37 | this.useSave = true, 38 | this.style, 39 | }); 40 | 41 | Map toMap() { 42 | return { 43 | "amount": amount.toString(), 44 | "currency": currency, 45 | "country": country, 46 | "email": email, 47 | "firstname": firstname, 48 | "lastname": lastname, 49 | "narration": narration, 50 | "publicKey": publicKey, 51 | "secretKey": secretKey, 52 | "txRef": txRef, 53 | "useAccounts": useAccounts, 54 | "metadata": metadata != null 55 | ? metadata.map((meta) => meta.toMap()).toList() 56 | : [], 57 | "useCards": useCards, 58 | "isStaging": isStaging, 59 | "useSave": useSave, 60 | "style": null, 61 | }; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 8 | 9 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_ravepay/flutter_ravepay.dart'; 3 | 4 | void main() => runApp(new MyApp()); 5 | 6 | class MyApp extends StatefulWidget { 7 | @override 8 | _MyAppState createState() => new _MyAppState(); 9 | } 10 | 11 | class _MyAppState extends State { 12 | Ravepay ravePay; 13 | RavepayResult _result; 14 | 15 | void chargeCard() async { 16 | final RavepayResult result = await ravePay.chargeCard( 17 | const RavepayConfig( 18 | amount: 4500.0, 19 | country: "NG", 20 | currency: "NGN", 21 | email: "jeremiahogbomo@gmail.com", 22 | firstname: "Jeremiah", 23 | lastname: "Ogbomo", 24 | narration: "Test Payment", 25 | publicKey: "FLWPUBK-cd3500135be97b13a29c70e3ee233cbf-X", 26 | secretKey: "FLWSECK-6257675603889ba57c880eda2a936b46-X", 27 | txRef: "ravePay-1234345", 28 | useAccounts: false, 29 | useCards: true, 30 | isStaging: true, 31 | useSave: true, 32 | metadata: [ 33 | const RavepayMeta("email", "jeremiahogbomo@gmail.com"), 34 | const RavepayMeta("id", "1994"), 35 | ], 36 | ), 37 | ); 38 | 39 | setState(() { 40 | _result = result; 41 | }); 42 | } 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | ravePay = Ravepay.of(context); 47 | 48 | return new MaterialApp( 49 | home: new Scaffold( 50 | appBar: new AppBar( 51 | title: new Text('Flutter Ravepay'), 52 | ), 53 | body: new Center( 54 | child: SingleChildScrollView( 55 | child: new Column( 56 | mainAxisAlignment: MainAxisAlignment.center, 57 | children: [ 58 | new RaisedButton( 59 | color: Colors.green, 60 | onPressed: () => chargeCard(), 61 | child: new Text("TEST"), 62 | ), 63 | SizedBox( 64 | height: 16.0, 65 | ), 66 | new Text('Working?: ${_result?.toMap()}\n'), 67 | ], 68 | ), 69 | ), 70 | ), 71 | ), 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_ravepay_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | NSAppTransportSecurity 49 | 50 | NSExceptionDomains 51 | 52 | flw-pms-dev.eu-west-1.elasticbeanstalk.com 53 | 54 | NSExceptionAllowsInsecureHTTPLoads 55 | 56 | NSIncludesSubdomains 57 | 58 | 59 | localhost 60 | 61 | NSExceptionAllowsInsecureHTTPLoads 62 | 63 | NSIncludesSubdomains 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (4.7.2) 3 | - BSErrorMessageView (1.1) 4 | - CreditCardValidator (0.4) 5 | - DynamicBlurView (2.0.2) 6 | - Flutter (1.0.0) 7 | - flutter_ravepay (0.0.1): 8 | - Flutter 9 | - IQKeyboardManagerSwift (6.0.3) 10 | - KVNProgress (2.3.1) 11 | - PopupDialog (0.7.1): 12 | - DynamicBlurView (~> 2.0) 13 | - Shimmer (1.0.2) 14 | - SwiftValidator (4.0.0) 15 | 16 | DEPENDENCIES: 17 | - Alamofire 18 | - BSErrorMessageView (from `https://github.com/BenjaminSarkisyan/BSErrorMessageView.git`) 19 | - CreditCardValidator 20 | - Flutter (from `.symlinks/flutter/ios`) 21 | - flutter_ravepay (from `.symlinks/plugins/flutter_ravepay/ios`) 22 | - IQKeyboardManagerSwift 23 | - KVNProgress (~> 2.3.1) 24 | - PopupDialog 25 | - Shimmer 26 | - SwiftValidator (from `https://github.com/jpotts18/SwiftValidator.git`, branch `master`) 27 | 28 | SPEC REPOS: 29 | https://github.com/cocoapods/specs.git: 30 | - Alamofire 31 | - CreditCardValidator 32 | - DynamicBlurView 33 | - IQKeyboardManagerSwift 34 | - KVNProgress 35 | - PopupDialog 36 | - Shimmer 37 | 38 | EXTERNAL SOURCES: 39 | BSErrorMessageView: 40 | :git: https://github.com/BenjaminSarkisyan/BSErrorMessageView.git 41 | Flutter: 42 | :path: ".symlinks/flutter/ios" 43 | flutter_ravepay: 44 | :path: ".symlinks/plugins/flutter_ravepay/ios" 45 | SwiftValidator: 46 | :branch: master 47 | :git: https://github.com/jpotts18/SwiftValidator.git 48 | 49 | CHECKOUT OPTIONS: 50 | BSErrorMessageView: 51 | :commit: e1523069939ac597f9b7a9c615d718f89c071b49 52 | :git: https://github.com/BenjaminSarkisyan/BSErrorMessageView.git 53 | SwiftValidator: 54 | :commit: ba27b0e501bf542b5c1a97bed8f706d12fb2d4f4 55 | :git: https://github.com/jpotts18/SwiftValidator.git 56 | 57 | SPEC CHECKSUMS: 58 | Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223 59 | BSErrorMessageView: 67cc7d172995fbc6df602c2b8923f48121ddf7a9 60 | CreditCardValidator: 9f0814dd61682c004071a250d89327ca83514a48 61 | DynamicBlurView: aa6db4defc6e537eb86fc5e58dd3991666178399 62 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 63 | flutter_ravepay: f7691aa607578db136bc117013001c4550396c09 64 | IQKeyboardManagerSwift: 04e8679f85e496bb2c474eeb9284052f1b3c391c 65 | KVNProgress: 8167b1f19e2758290c0b6143020ed9dcbb0477a1 66 | PopupDialog: 39598b7d41719f5c025b4b70e62728bae7734fef 67 | Shimmer: c5374be1c2b0c9e292fb05b339a513cf291cac86 68 | SwiftValidator: 25ded5ca1f10c05adf57f6ac82a72d28ac8d91af 69 | 70 | PODFILE CHECKSUM: 5f4df3b93896a11ac8ecd2c29403800bf578d2c7 71 | 72 | COCOAPODS: 1.5.3 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Ravepay 2 | 3 | [![pub package](https://img.shields.io/pub/v/flutter_ravepay.svg)](https://pub.dartlang.org/packages/flutter_ravepay) 4 | 5 | Flutter_Ravepay provides a wrapper that incorporate payments using [Ravepay](https://rave.flutterwave.com/) within your flutter applications. The integration is achieved using Ravepay's [Android](https://flutterwavedevelopers.readme.io/docs/android)/[iOS](https://flutterwavedevelopers.readme.io/docs/ios) SDK libraries. It currently has full support for only Android. Getting it to work on iOS comes with a few more steps and configurations (soon to come). 6 | 7 |
8 | 9 | 10 | 13 | 14 | 15 | 18 | 19 |
11 | 12 |
16 | 17 |
20 |
21 | 22 | ## Installing 23 | 24 | ```yaml 25 | dependencies: 26 | flutter_ravepay: "^0.2.0" 27 | ``` 28 | 29 | ### Import 30 | 31 | ```dart 32 | import 'package:flutter_ravepay/flutter_ravepay.dart'; 33 | ``` 34 | 35 | ### Instantiate 36 | 37 | ```dart 38 | Ravepay ravePay = Ravepay.of(context); 39 | ``` 40 | 41 | ### Charging a Card 42 | 43 | ```dart 44 | RavepayResult result = await ravePay.chargeCard( 45 | const RavepayConfig( 46 | amount: 4500.0, 47 | country: "NG", 48 | currency: "NGN", 49 | email: "testemail@gmail.com", 50 | firstname: "Jeremiah", 51 | lastname: "Ogbomo", 52 | narration: "Test Payment", 53 | publicKey: "****", 54 | secretKey: "****", 55 | txRef: "ravePay-1234345", 56 | useAccounts: false, 57 | useCards: true, 58 | isStaging: true, 59 | useSave: true, 60 | metadata: [ 61 | const RavepayMeta("email", "jeremiahogbomo@gmail.com"), 62 | const RavepayMeta("id", "1994"), 63 | ] 64 | ), 65 | ); 66 | ``` 67 | 68 | ## Bugs/Requests 69 | 70 | If you encounter any problems feel free to open an issue. If you feel the library is 71 | missing a feature, please raise a ticket on Github and I'll look into it. 72 | Pull request are also welcome. 73 | 74 | ## Note 75 | 76 | For help getting started with Flutter, view our online 77 | [documentation](https://flutter.io/). 78 | 79 | For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code). 80 | 81 | ## License 82 | 83 | MIT License 84 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | pod 'SwiftValidator', :git => 'https://github.com/jpotts18/SwiftValidator.git', :branch => 'master' 8 | pod 'BSErrorMessageView', :git => 'https://github.com/BenjaminSarkisyan/BSErrorMessageView.git' 9 | pod 'KVNProgress', '~> 2.3.1' 10 | pod 'IQKeyboardManagerSwift' 11 | pod 'Alamofire' 12 | pod 'PopupDialog' 13 | pod 'Shimmer' 14 | pod 'CreditCardValidator' 15 | 16 | def parse_KV_file(file, separator='=') 17 | file_abs_path = File.expand_path(file) 18 | if !File.exists? file_abs_path 19 | return []; 20 | end 21 | pods_ary = [] 22 | skip_line_start_symbols = ["#", "/"] 23 | File.foreach(file_abs_path) { |line| 24 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 25 | plugin = line.split(pattern=separator) 26 | if plugin.length == 2 27 | podname = plugin[0].strip() 28 | path = plugin[1].strip() 29 | podpath = File.expand_path("#{path}", file_abs_path) 30 | pods_ary.push({:name => podname, :path => podpath}); 31 | else 32 | puts "Invalid plugin specification: #{line}" 33 | end 34 | } 35 | return pods_ary 36 | end 37 | 38 | target 'Runner' do 39 | use_frameworks! 40 | 41 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 42 | # referring to absolute paths on developers' machines. 43 | system('rm -rf .symlinks') 44 | system('mkdir -p .symlinks/plugins') 45 | 46 | # Flutter Pods 47 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 48 | if generated_xcode_build_settings.empty? 49 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 50 | end 51 | generated_xcode_build_settings.map { |p| 52 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 53 | symlink = File.join('.symlinks', 'flutter') 54 | File.symlink(File.dirname(p[:path]), symlink) 55 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 56 | end 57 | } 58 | 59 | # Plugin Pods 60 | plugin_pods = parse_KV_file('../.flutter-plugins') 61 | plugin_pods.map { |p| 62 | symlink = File.join('.symlinks', 'plugins', p[:name]) 63 | File.symlink(p[:path], symlink) 64 | pod p[:name], :path => File.join(symlink, 'ios') 65 | } 66 | end 67 | 68 | post_install do |installer| 69 | installer.pods_project.targets.each do |target| 70 | target.build_configurations.each do |config| 71 | config.build_settings['ENABLE_BITCODE'] = 'NO' 72 | end 73 | # workaround for https://github.com/CocoaPods/CocoaPods/issues/7463 74 | target.headers_build_phase.files.each do |file| 75 | file.settings = { 'ATTRIBUTES' => ['Public'] } 76 | end 77 | end 78 | end 79 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /lib/src/result.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_ravepay/src/card.dart'; 2 | 3 | class RavepayResult { 4 | int id; 5 | int merchantId; 6 | int customerId; 7 | int isLive; 8 | double amount; 9 | double appfee; 10 | double merchantfee; 11 | double chargedAmount; 12 | double merchantbearsfee; 13 | String txRef; 14 | String flwRef; 15 | String orderRef; 16 | String raveRef; 17 | String transactionCurrency; 18 | String paymentEntity; 19 | String paymentId; 20 | String chargeType; 21 | String fraudStatus; 22 | String narration; 23 | DateTime createdAt; 24 | DateTime updatedAt; 25 | RavepayCard card; 26 | 27 | String ___status; 28 | String __status; 29 | String __message; 30 | 31 | final Map __payload; 32 | 33 | RavepayResult(this.___status, this.__payload) { 34 | if (!isCancel && __payload != null) { 35 | __status = __payload['status']; 36 | __message = __payload['message']; 37 | final Map data = __payload['data']; 38 | 39 | if (data != null) { 40 | id = int.tryParse(data["id"].toString()); 41 | amount = double.tryParse(data["amount"].toString()); 42 | orderRef = data["order_ref"]; 43 | raveRef = data["rave_ref"]; 44 | isLive = int.tryParse(data["id"].toString()); 45 | appfee = double.tryParse(data["appfee"].toString()); 46 | merchantfee = double.tryParse(data["merchantfee"].toString()); 47 | chargedAmount = double.tryParse(data["charged_amount"].toString()); 48 | merchantbearsfee = double.tryParse(data["merchant_id"].toString()); 49 | merchantId = int.tryParse(data["merchantbearsfee"].toString()); 50 | customerId = int.tryParse(data["customer.id"].toString()); 51 | transactionCurrency = data["transaction_currency"]; 52 | paymentEntity = data["payment_entity"]; 53 | paymentId = data["payment_id"]; 54 | chargeType = data["charge_type"]; 55 | fraudStatus = data["fraud_status"]; 56 | narration = data["narration"]; 57 | createdAt = DateTime.tryParse(data["createdAt"]); 58 | updatedAt = DateTime.tryParse(data["updatedAt"]); 59 | txRef = data["tx_ref"]; 60 | flwRef = data["flw_ref"]; 61 | card = data["card"] != null ? RavepayCard.fromMap(data["card"]) : null; 62 | } 63 | } 64 | } 65 | 66 | bool get isSuccess => ___status == "SUCCESS"; 67 | bool get isError => ___status == "ERROR"; 68 | bool get isCancel => ___status == "CANCELLED"; 69 | 70 | String getStatus() => __status; 71 | 72 | String getMessage() => __message; 73 | 74 | Map toMap() { 75 | if (isCancel) { 76 | return null; 77 | } 78 | return { 79 | "id": id.toString(), 80 | "amount": amount.toString(), 81 | "orderRef": orderRef, 82 | "raveRef": raveRef, 83 | "isLive": id.toString(), 84 | "appfee": appfee.toString(), 85 | "merchantfee": merchantfee.toString(), 86 | "chargedAmount": chargedAmount.toString(), 87 | "merchantbearsfee": merchantId.toString(), 88 | "merchantId": merchantbearsfee.toString(), 89 | "customerId": customerId.toString(), 90 | "transactionCurrency": transactionCurrency, 91 | "paymentEntity": paymentEntity, 92 | "paymentId": paymentId, 93 | "chargeType": chargeType, 94 | "fraudStatus": fraudStatus, 95 | "narration": narration, 96 | "createdAt": createdAt.toString(), 97 | "updatedAt": updatedAt.toString(), 98 | "txRef": txRef, 99 | "flwRef": flwRef, 100 | "card": card.toMap(), 101 | }; 102 | } 103 | 104 | /// Response as it is from Ravepay 105 | Map raw() { 106 | return !isCancel ? __payload['data'] : null; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | import Rave 4 | import Alamofire 5 | 6 | @UIApplicationMain 7 | @objc class AppDelegate: FlutterAppDelegate, RavePaymentManagerDelegate { 8 | var _result: FlutterResult! 9 | var RAVEPAY_CHANNEL = "ng.i.handikraft/flutter_ravepay" 10 | 11 | override func application( 12 | _ application: UIApplication, 13 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 14 | ) -> Bool { 15 | GeneratedPluginRegistrant.register(with: self) 16 | let controller = self.window.rootViewController 17 | let channel = FlutterMethodChannel(name: RAVEPAY_CHANNEL, binaryMessenger: controller as! FlutterBinaryMessenger); 18 | 19 | channel.setMethodCallHandler(handle) 20 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 21 | } 22 | 23 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 24 | print("iOS => call \(call.method)") 25 | _result = result 26 | switch (call.method) { 27 | case "chargeCard": 28 | chargeCard(call) 29 | default: 30 | _result(FlutterMethodNotImplemented) 31 | } 32 | } 33 | 34 | public func chargeCard(_ call: FlutterMethodCall) { 35 | let config = RavePayConfig.sharedConfig() 36 | 37 | let options = call.arguments as! [String: Any] 38 | let amount = options["amount"] as! String 39 | let country = options["country"] as! String 40 | let currency = options["currency"] as! String 41 | let email = options["email"] as! String 42 | let isStaging = options["isStaging"] 43 | let meta = options["metadata"] as! [[String: String]] 44 | let narration = options["narration"] as! String 45 | // let useAccounts = options["useAccounts"] as! Bool 46 | // let useCards = options["useCards"] as! Bool 47 | let useSave = options["useSave"] as! Bool 48 | let txRef = options["txRef"] as! String 49 | // let style = options["style"] as! String 50 | let publicKey = options["publicKey"] as! String 51 | let secretKey = options["secretKey"] as! String 52 | 53 | config.publicKey = publicKey 54 | config.secretKey = secretKey 55 | config.isStaging = isStaging != nil ? isStaging as! Bool : true 56 | config.themeColor = UIColor.init(hex: "B456BF") 57 | config.buttonThemeColor = UIColor.init(hex: "FEC545") 58 | 59 | let raveMgr = RavePayManager() 60 | raveMgr.email = email 61 | raveMgr.amount = amount 62 | raveMgr.transcationRef = txRef 63 | raveMgr.country = country 64 | raveMgr.currencyCode = currency 65 | raveMgr.savedCardsAllow = useSave 66 | raveMgr.delegate = self 67 | raveMgr.narration = narration 68 | raveMgr.meta = meta 69 | raveMgr.supportedPaymentMethods = [.card] 70 | // raveMgr.supportedPaymentMethods = [.card,.account] // Choose supported payment channel allowed 71 | 72 | raveMgr.show(withController:self.window.rootViewController!) 73 | } 74 | 75 | func ravePaymentManagerDidCancel(_ ravePaymentManager: RavePayManager) { 76 | _result(["status": "CANCELLED", "payload": nil]); 77 | } 78 | 79 | func ravePaymentManager(_ ravePaymentManager: RavePayManager, didSucceedPaymentWithResult result: [String : AnyObject]) { 80 | let payload = result["payload"]!; 81 | let data = payload["data"] as! [String: AnyObject]; 82 | let secret = RavePayConfig.sharedConfig().secretKey; 83 | let flwRef = data["flw_ref"]!; 84 | let isStaging = RavePayConfig.sharedConfig().isStaging; 85 | let url = isStaging ? "https://ravesandboxapi.flutterwave.com" : "https://api.ravepay.co"; 86 | let params = ["SECKEY": secret as Any, "flw_ref": flwRef] as! [String: String]; 87 | 88 | Alamofire.request(url + "/flwv3-pug/getpaidx/api/verify", method: .post, parameters: params).responseJSON { 89 | (res) -> Void in 90 | 91 | if(res.result.isSuccess){ 92 | let result = res.result.value as? Dictionary; 93 | if let status = result?["status"] as? String{ 94 | if (status == "success"){ 95 | self._result(["status": "SUCCESS", "payload": result!]); 96 | } 97 | } 98 | } else{ 99 | // KVNProgress.dismiss() 100 | // showMessageDialog("Error", message: "Something went wrong please try again.", image: nil, axis: .horizontal, viewController: self, handler: { 101 | // }) 102 | // errorCallback( res.result.error!.localizedDescription) 103 | } 104 | } 105 | } 106 | 107 | func ravePaymentManager(_ ravePaymentManager: RavePayManager, didFailPaymentWithResult result: [String : AnyObject]) { 108 | _result(["status": "ERROR", "payload": result["payload"]!]); 109 | } 110 | } 111 | 112 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /android/src/main/java/io/github/jogboms/flutterravepay/FlutterRavepayPlugin.java: -------------------------------------------------------------------------------- 1 | package io.github.jogboms.flutterravepay; 2 | 3 | import io.flutter.plugin.common.PluginRegistry; 4 | import io.flutter.plugin.common.PluginRegistry.Registrar; 5 | import io.flutter.plugin.common.MethodChannel; 6 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler; 7 | import io.flutter.plugin.common.MethodChannel.Result; 8 | import io.flutter.plugin.common.MethodCall; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | import java.util.HashMap; 13 | import java.util.Map; 14 | 15 | import android.content.Intent; 16 | import android.util.Log; 17 | 18 | import com.flutterwave.raveandroid.RavePayManager; 19 | import com.flutterwave.raveandroid.RavePayActivity; 20 | import com.flutterwave.raveandroid.RaveConstants; 21 | import com.flutterwave.raveandroid.Meta; 22 | 23 | /** 24 | * FlutterRavepayPlugin 25 | */ 26 | public class FlutterRavepayPlugin implements PluginRegistry.ActivityResultListener, MethodCallHandler { 27 | public static final String TAG = "FlutterRavepayPlugin"; 28 | private static final String CHANNEL_NAME = "ng.i.handikraft/flutter_ravepay"; 29 | private static final String METHOD_CHARGE_CARD = "chargeCard"; 30 | 31 | private final Registrar registrar; 32 | private Result pendingResult; 33 | 34 | private RavePayManager ravepayManager; 35 | private Map chargeParams; 36 | 37 | private FlutterRavepayPlugin(Registrar registrar) { 38 | this.registrar = registrar; 39 | initialize(); 40 | } 41 | 42 | /** 43 | * Plugin registration. 44 | */ 45 | public static void registerWith(Registrar registrar) { 46 | final FlutterRavepayPlugin plugin = new FlutterRavepayPlugin(registrar); 47 | final MethodChannel channel = new MethodChannel(registrar.messenger(), CHANNEL_NAME); 48 | channel.setMethodCallHandler(plugin); 49 | } 50 | 51 | @Override 52 | public void onMethodCall(MethodCall call, Result result) { 53 | Log.d(TAG, call.method); 54 | if (call.method.equals("chargeCard")) { 55 | if (!(call.arguments instanceof Map)) { 56 | throw new IllegalArgumentException("Plugin not passing a map as parameter: " + call.arguments); 57 | } 58 | chargeParams = (Map) call.arguments; 59 | setPendingResult(call.method, result); 60 | chargeCard(); 61 | } else { 62 | result.notImplemented(); 63 | } 64 | } 65 | 66 | private void setPendingResult(String methodName, MethodChannel.Result result) { 67 | if (pendingResult != null) { 68 | result.error("ERROR", methodName + " called while another FlutterRavepay operation was in progress.", null); 69 | } 70 | 71 | pendingResult = result; 72 | } 73 | 74 | private void finishWithResult(HashMap result) { 75 | if (pendingResult != null) { 76 | pendingResult.success(result); 77 | pendingResult = null; 78 | } 79 | } 80 | 81 | @Override 82 | public boolean onActivityResult(int requestCode, int resultCode, Intent data) { 83 | Log.d(TAG, "Result " + data); 84 | final HashMap res = new HashMap(); 85 | if (requestCode == RaveConstants.RAVE_REQUEST_CODE && data != null) { 86 | String message = data.getStringExtra("response"); 87 | if (resultCode == RavePayActivity.RESULT_SUCCESS) { 88 | Log.d(TAG, "SUCCESS " + message); 89 | res.put("status", "SUCCESS"); 90 | } else if (resultCode == RavePayActivity.RESULT_ERROR) { 91 | Log.d(TAG, "ERROR " + message); 92 | res.put("status", "ERROR"); 93 | } else if (resultCode == RavePayActivity.RESULT_CANCELLED) { 94 | Log.d(TAG, "CANCELLED " + message); 95 | res.put("status", "CANCELLED"); 96 | } 97 | res.put("payload", message); 98 | finishWithResult(res); 99 | return true; 100 | } 101 | return false; 102 | } 103 | 104 | private RavePayManager initialize() { 105 | if (ravepayManager == null) { 106 | registrar.addActivityResultListener(this); 107 | ravepayManager = new RavePayManager(registrar.activity()); 108 | } 109 | 110 | return ravepayManager; 111 | } 112 | 113 | public void chargeCard() { 114 | ravepayManager.setAmount(Double.parseDouble((String) chargeParams.get("amount"))); 115 | ravepayManager.setCountry((String) chargeParams.get("country")); 116 | ravepayManager.setCurrency((String) chargeParams.get("currency")); 117 | ravepayManager.setEmail((String) chargeParams.get("email")); 118 | 119 | ravepayManager.setfName((String) chargeParams.get("firstname")); 120 | ravepayManager.setlName((String) chargeParams.get("lastname")); 121 | ravepayManager.setNarration((String) chargeParams.get("narration")); 122 | 123 | ravepayManager.setPublicKey((String) chargeParams.get("publicKey")); 124 | 125 | ravepayManager.setSecretKey((String) chargeParams.get("secretKey")); 126 | ravepayManager.setTxRef((String) chargeParams.get("txRef")); 127 | 128 | List metaList = new ArrayList(); 129 | for(Map meta: (List) chargeParams.get("metadata")){ 130 | metaList.add(new Meta((String) meta.get("metaname"), (String) meta.get("metavalue"))); 131 | } 132 | 133 | ravepayManager.setMeta(metaList); 134 | // ravepayManager.setMeta((List) (List) chargeParams.get("metadata")); 135 | ravepayManager.acceptAccountPayments((boolean) chargeParams.get("useAccounts")); 136 | ravepayManager.acceptCardPayments((boolean) chargeParams.get("useCards")); 137 | ravepayManager.onStagingEnv((boolean) chargeParams.get("isStaging")); 138 | ravepayManager.allowSaveCardFeature((boolean) chargeParams.get("useSave")); 139 | 140 | boolean hasTheme = hasStringKey("style"); 141 | if (hasTheme) { 142 | ravepayManager.withTheme((int) chargeParams.get("style")); 143 | } 144 | 145 | ravepayManager.initialize(); 146 | } 147 | 148 | private boolean isEmpty(String s) { 149 | return s == null || s.length() < 1; 150 | } 151 | 152 | private boolean hasStringKey(String key) { 153 | return chargeParams.containsKey(key) && !isEmpty((String) chargeParams.get(key)); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # From: https://github.com/flutter/flutter/blob/master/analysis_options.yaml 2 | # 3 | # Specify analysis options. 4 | # 5 | # Until there are meta linter rules, each desired lint must be explicitly enabled. 6 | # See: https://github.com/dart-lang/linter/issues/288 7 | # 8 | # For a list of lints, see: http://dart-lang.github.io/linter/lints/ 9 | # See the configuration guide for more 10 | # https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer 11 | # 12 | # There are four similar analysis options files in the flutter repos: 13 | # - analysis_options.yaml (this file) 14 | # - packages/flutter/lib/analysis_options_user.yaml 15 | # - https://github.com/flutter/plugins/blob/master/analysis_options.yaml 16 | # - https://github.com/flutter/engine/blob/master/analysis_options.yaml 17 | # 18 | # This file contains the analysis options used by Flutter tools, such as IntelliJ, 19 | # Android Studio, and the `flutter analyze` command. 20 | # 21 | # The flutter/plugins repo contains a copy of this file, which should be kept 22 | # in sync with this file. 23 | 24 | analyzer: 25 | language: 26 | enableSuperMixins: true 27 | strong-mode: 28 | implicit-dynamic: false 29 | errors: 30 | # treat missing required parameters as a warning (not a hint) 31 | missing_required_param: warning 32 | # treat missing returns as a warning (not a hint) 33 | missing_return: warning 34 | # allow having TODOs in the code 35 | todo: ignore 36 | exclude: 37 | - 'bin/cache/**' 38 | # the following two are relative to the stocks example and the flutter package respectively 39 | # see https://github.com/dart-lang/sdk/issues/28463 40 | - 'lib/i18n/stock_messages_*.dart' 41 | - 'lib/src/http/**' 42 | 43 | linter: 44 | rules: 45 | # - prefer_const_literals_to_create_immutables 46 | # - avoid_classes_with_only_static_members 47 | # - avoid_function_literals_in_foreach_calls 48 | # these rules are documented on and in the same order as 49 | # the Dart Lint rules page to make maintenance easier 50 | # https://github.com/dart-lang/linter/blob/master/example/all.yaml 51 | - always_declare_return_types 52 | - always_put_control_body_on_new_line 53 | # - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219 54 | - always_require_non_null_named_parameters 55 | # - always_specify_types # not support by built_value 56 | - annotate_overrides 57 | # - avoid_annotating_with_dynamic # conflicts with always_specify_types 58 | # - avoid_as # not supported by built_value 59 | # - avoid_bool_literals_in_conditional_expressions # not yet tested 60 | # - avoid_catches_without_on_clauses # we do this commonly 61 | # - avoid_catching_errors # we do this commonly 62 | # - avoid_double_and_int_checks # only useful when targeting JS runtime 63 | - avoid_empty_else 64 | - avoid_field_initializers_in_const_classes 65 | - avoid_init_to_null 66 | # - avoid_js_rounded_ints # only useful when targeting JS runtime 67 | - avoid_null_checks_in_equality_operators 68 | # - avoid_positional_boolean_parameters # not yet tested 69 | # - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356) 70 | - avoid_relative_lib_imports 71 | - avoid_renaming_method_parameters 72 | - avoid_return_types_on_setters 73 | # - avoid_returning_null # we do this commonly 74 | # - avoid_returning_this # https://github.com/dart-lang/linter/issues/842 75 | # - avoid_setters_without_getters # not yet tested 76 | # - avoid_single_cascade_in_expression_statements # not yet tested 77 | - avoid_slow_async_io 78 | # - avoid_types_as_parameter_names # https://github.com/dart-lang/linter/pull/954/files 79 | # - avoid_types_on_closure_parameters # conflicts with always_specify_types 80 | # - avoid_unused_constructor_parameters # https://github.com/dart-lang/linter/pull/847 81 | - await_only_futures 82 | - camel_case_types 83 | - cancel_subscriptions 84 | # - cascade_invocations # not yet tested 85 | # - close_sinks # https://github.com/flutter/flutter/issues/5789 86 | # - comment_references # blocked on https://github.com/dart-lang/dartdoc/issues/1153 87 | # - constant_identifier_names # https://github.com/dart-lang/linter/issues/204 88 | - control_flow_in_finally 89 | - directives_ordering 90 | - empty_catches 91 | - empty_constructor_bodies 92 | - empty_statements 93 | - hash_and_equals 94 | - implementation_imports 95 | # - invariant_booleans # https://github.com/flutter/flutter/issues/5790 96 | - iterable_contains_unrelated_type 97 | # - join_return_with_assignment # not yet tested 98 | - library_names 99 | - library_prefixes 100 | - list_remove_unrelated_type 101 | # - literal_only_boolean_expressions # https://github.com/flutter/flutter/issues/5791 102 | - no_adjacent_strings_in_list 103 | - no_duplicate_case_values 104 | - non_constant_identifier_names 105 | # - omit_local_variable_types # opposite of always_specify_types 106 | # - one_member_abstracts # too many false positives 107 | # - only_throw_errors # https://github.com/flutter/flutter/issues/5792 108 | - overridden_fields 109 | - package_api_docs 110 | - package_names 111 | - package_prefixed_library_names 112 | # - parameter_assignments # we do this commonly 113 | - prefer_adjacent_string_concatenation 114 | - prefer_asserts_in_initializer_lists 115 | - prefer_bool_in_asserts 116 | - prefer_collection_literals 117 | - prefer_conditional_assignment 118 | # - prefer_const_constructors 119 | - prefer_const_constructors_in_immutables 120 | - prefer_const_declarations 121 | # - prefer_constructors_over_static_methods # not yet tested 122 | - prefer_contains 123 | # - prefer_equal_for_default_values # not supported by built_value 124 | # - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods 125 | - prefer_final_fields 126 | - prefer_final_locals 127 | - prefer_foreach 128 | # - prefer_function_declarations_over_variables # not yet tested 129 | - prefer_initializing_formals 130 | # - prefer_interpolation_to_compose_strings # not yet tested 131 | # - prefer_iterable_whereType # https://github.com/dart-lang/sdk/issues/32463 132 | - prefer_is_empty 133 | - prefer_is_not_empty 134 | # - prefer_single_quotes 135 | - prefer_typing_uninitialized_variables 136 | - recursive_getters 137 | - slash_for_doc_comments 138 | - sort_constructors_first 139 | - sort_unnamed_constructors_first 140 | - super_goes_last 141 | - test_types_in_equals 142 | - throw_in_finally 143 | # - type_annotate_public_apis # subset of always_specify_types 144 | - type_init_formals 145 | # - unawaited_futures # https://github.com/flutter/flutter/issues/5793 146 | - unnecessary_brace_in_string_interps 147 | - unnecessary_getters_setters 148 | # - unnecessary_lambdas # https://github.com/dart-lang/linter/issues/498 149 | - unnecessary_null_aware_assignments 150 | - unnecessary_null_in_if_null_operators 151 | - unnecessary_overrides 152 | - unnecessary_parenthesis 153 | # - unnecessary_statements # not yet tested 154 | # - unnecessary_this 155 | - unrelated_type_equality_checks 156 | - use_rethrow_when_possible 157 | # - use_setters_to_change_properties # not yet tested 158 | # - use_string_buffers # https://github.com/dart-lang/linter/pull/664 159 | # - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review 160 | - valid_regexps 161 | # - void_checks # not yet tested 162 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 02035446D1891AFBDDC16405 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5271BC4B266A31C1CB060BFD /* Pods_Runner.framework */; }; 11 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 12 | 1891FCF120C3134300616E27 /* Rave.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1891FCF020C3134300616E27 /* Rave.framework */; }; 13 | 1891FCF220C3134300616E27 /* Rave.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1891FCF020C3134300616E27 /* Rave.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 15 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 16 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 17 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 19 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 20 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | 1891FCF220C3134300616E27 /* Rave.framework in Embed Frameworks */, 36 | ); 37 | name = "Embed Frameworks"; 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXCopyFilesBuildPhase section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 44 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 45 | 1891FCF020C3134300616E27 /* Rave.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Rave.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 47 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 48 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 49 | 5271BC4B266A31C1CB060BFD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 51 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 52 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 53 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 54 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 55 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 56 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 58 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 59 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 60 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 69 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 70 | 1891FCF120C3134300616E27 /* Rave.framework in Frameworks */, 71 | 02035446D1891AFBDDC16405 /* Pods_Runner.framework in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 04CDE59880A9E1F7007AEE24 /* Frameworks */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 5271BC4B266A31C1CB060BFD /* Pods_Runner.framework */, 82 | ); 83 | name = Frameworks; 84 | sourceTree = ""; 85 | }; 86 | 8D1D6F6627C1E21738495261 /* Pods */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | ); 90 | name = Pods; 91 | sourceTree = ""; 92 | }; 93 | 9740EEB11CF90186004384FC /* Flutter */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 97 | 3B80C3931E831B6300D905FE /* App.framework */, 98 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 99 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 100 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 101 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 102 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 103 | ); 104 | name = Flutter; 105 | sourceTree = ""; 106 | }; 107 | 97C146E51CF9000F007C117D = { 108 | isa = PBXGroup; 109 | children = ( 110 | 1891FCF020C3134300616E27 /* Rave.framework */, 111 | 9740EEB11CF90186004384FC /* Flutter */, 112 | 97C146F01CF9000F007C117D /* Runner */, 113 | 97C146EF1CF9000F007C117D /* Products */, 114 | 8D1D6F6627C1E21738495261 /* Pods */, 115 | 04CDE59880A9E1F7007AEE24 /* Frameworks */, 116 | ); 117 | sourceTree = ""; 118 | }; 119 | 97C146EF1CF9000F007C117D /* Products */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 97C146EE1CF9000F007C117D /* Runner.app */, 123 | ); 124 | name = Products; 125 | sourceTree = ""; 126 | }; 127 | 97C146F01CF9000F007C117D /* Runner */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 131 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 132 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 133 | 97C147021CF9000F007C117D /* Info.plist */, 134 | 97C146F11CF9000F007C117D /* Supporting Files */, 135 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 136 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 137 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 138 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 139 | ); 140 | path = Runner; 141 | sourceTree = ""; 142 | }; 143 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | ); 147 | name = "Supporting Files"; 148 | sourceTree = ""; 149 | }; 150 | /* End PBXGroup section */ 151 | 152 | /* Begin PBXNativeTarget section */ 153 | 97C146ED1CF9000F007C117D /* Runner */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 156 | buildPhases = ( 157 | D40BF4D7BF5A014A8E99220B /* [CP] Check Pods Manifest.lock */, 158 | 9740EEB61CF901F6004384FC /* Run Script */, 159 | 97C146EA1CF9000F007C117D /* Sources */, 160 | 97C146EB1CF9000F007C117D /* Frameworks */, 161 | 97C146EC1CF9000F007C117D /* Resources */, 162 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 163 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 164 | CE161F2A8CCFD4E900436977 /* [CP] Embed Pods Frameworks */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | ); 170 | name = Runner; 171 | productName = Runner; 172 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 173 | productType = "com.apple.product-type.application"; 174 | }; 175 | /* End PBXNativeTarget section */ 176 | 177 | /* Begin PBXProject section */ 178 | 97C146E61CF9000F007C117D /* Project object */ = { 179 | isa = PBXProject; 180 | attributes = { 181 | LastUpgradeCheck = 0920; 182 | ORGANIZATIONNAME = "The Chromium Authors"; 183 | TargetAttributes = { 184 | 97C146ED1CF9000F007C117D = { 185 | CreatedOnToolsVersion = 7.3.1; 186 | DevelopmentTeam = NS5XW2Q4P8; 187 | LastSwiftMigration = 0910; 188 | }; 189 | }; 190 | }; 191 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 192 | compatibilityVersion = "Xcode 3.2"; 193 | developmentRegion = English; 194 | hasScannedForEncodings = 0; 195 | knownRegions = ( 196 | en, 197 | Base, 198 | ); 199 | mainGroup = 97C146E51CF9000F007C117D; 200 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 201 | projectDirPath = ""; 202 | projectRoot = ""; 203 | targets = ( 204 | 97C146ED1CF9000F007C117D /* Runner */, 205 | ); 206 | }; 207 | /* End PBXProject section */ 208 | 209 | /* Begin PBXResourcesBuildPhase section */ 210 | 97C146EC1CF9000F007C117D /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 215 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 216 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 217 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 218 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | }; 222 | /* End PBXResourcesBuildPhase section */ 223 | 224 | /* Begin PBXShellScriptBuildPhase section */ 225 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 226 | isa = PBXShellScriptBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | ); 230 | inputPaths = ( 231 | ); 232 | name = "Thin Binary"; 233 | outputPaths = ( 234 | ); 235 | runOnlyForDeploymentPostprocessing = 0; 236 | shellPath = /bin/sh; 237 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 238 | }; 239 | 9740EEB61CF901F6004384FC /* Run Script */ = { 240 | isa = PBXShellScriptBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | ); 244 | inputPaths = ( 245 | ); 246 | name = "Run Script"; 247 | outputPaths = ( 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | shellPath = /bin/sh; 251 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 252 | }; 253 | CE161F2A8CCFD4E900436977 /* [CP] Embed Pods Frameworks */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputPaths = ( 259 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 260 | "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", 261 | "${BUILT_PRODUCTS_DIR}/BSErrorMessageView/BSErrorMessageView.framework", 262 | "${BUILT_PRODUCTS_DIR}/CreditCardValidator/CreditCardValidator.framework", 263 | "${BUILT_PRODUCTS_DIR}/DynamicBlurView/DynamicBlurView.framework", 264 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 265 | "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", 266 | "${BUILT_PRODUCTS_DIR}/KVNProgress/KVNProgress.framework", 267 | "${BUILT_PRODUCTS_DIR}/PopupDialog/PopupDialog.framework", 268 | "${BUILT_PRODUCTS_DIR}/Shimmer/Shimmer.framework", 269 | "${BUILT_PRODUCTS_DIR}/SwiftValidator/SwiftValidator.framework", 270 | "${BUILT_PRODUCTS_DIR}/flutter_ravepay/flutter_ravepay.framework", 271 | ); 272 | name = "[CP] Embed Pods Frameworks"; 273 | outputPaths = ( 274 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", 275 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BSErrorMessageView.framework", 276 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CreditCardValidator.framework", 277 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DynamicBlurView.framework", 278 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 279 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework", 280 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KVNProgress.framework", 281 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PopupDialog.framework", 282 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Shimmer.framework", 283 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftValidator.framework", 284 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_ravepay.framework", 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | shellPath = /bin/sh; 288 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 289 | showEnvVarsInLog = 0; 290 | }; 291 | D40BF4D7BF5A014A8E99220B /* [CP] Check Pods Manifest.lock */ = { 292 | isa = PBXShellScriptBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | ); 296 | inputPaths = ( 297 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 298 | "${PODS_ROOT}/Manifest.lock", 299 | ); 300 | name = "[CP] Check Pods Manifest.lock"; 301 | outputPaths = ( 302 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | shellPath = /bin/sh; 306 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 307 | showEnvVarsInLog = 0; 308 | }; 309 | /* End PBXShellScriptBuildPhase section */ 310 | 311 | /* Begin PBXSourcesBuildPhase section */ 312 | 97C146EA1CF9000F007C117D /* Sources */ = { 313 | isa = PBXSourcesBuildPhase; 314 | buildActionMask = 2147483647; 315 | files = ( 316 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 317 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | /* End PBXSourcesBuildPhase section */ 322 | 323 | /* Begin PBXVariantGroup section */ 324 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 325 | isa = PBXVariantGroup; 326 | children = ( 327 | 97C146FB1CF9000F007C117D /* Base */, 328 | ); 329 | name = Main.storyboard; 330 | sourceTree = ""; 331 | }; 332 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 333 | isa = PBXVariantGroup; 334 | children = ( 335 | 97C147001CF9000F007C117D /* Base */, 336 | ); 337 | name = LaunchScreen.storyboard; 338 | sourceTree = ""; 339 | }; 340 | /* End PBXVariantGroup section */ 341 | 342 | /* Begin XCBuildConfiguration section */ 343 | 97C147031CF9000F007C117D /* Debug */ = { 344 | isa = XCBuildConfiguration; 345 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 346 | buildSettings = { 347 | ALWAYS_SEARCH_USER_PATHS = NO; 348 | CLANG_ANALYZER_NONNULL = YES; 349 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 350 | CLANG_CXX_LIBRARY = "libc++"; 351 | CLANG_ENABLE_MODULES = YES; 352 | CLANG_ENABLE_OBJC_ARC = YES; 353 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 354 | CLANG_WARN_BOOL_CONVERSION = YES; 355 | CLANG_WARN_COMMA = YES; 356 | CLANG_WARN_CONSTANT_CONVERSION = YES; 357 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 358 | CLANG_WARN_EMPTY_BODY = YES; 359 | CLANG_WARN_ENUM_CONVERSION = YES; 360 | CLANG_WARN_INFINITE_RECURSION = YES; 361 | CLANG_WARN_INT_CONVERSION = YES; 362 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 363 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 366 | CLANG_WARN_STRICT_PROTOTYPES = YES; 367 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 368 | CLANG_WARN_UNREACHABLE_CODE = YES; 369 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 370 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 371 | COPY_PHASE_STRIP = NO; 372 | DEBUG_INFORMATION_FORMAT = dwarf; 373 | ENABLE_STRICT_OBJC_MSGSEND = YES; 374 | ENABLE_TESTABILITY = YES; 375 | GCC_C_LANGUAGE_STANDARD = gnu99; 376 | GCC_DYNAMIC_NO_PIC = NO; 377 | GCC_NO_COMMON_BLOCKS = YES; 378 | GCC_OPTIMIZATION_LEVEL = 0; 379 | GCC_PREPROCESSOR_DEFINITIONS = ( 380 | "DEBUG=1", 381 | "$(inherited)", 382 | ); 383 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 384 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 385 | GCC_WARN_UNDECLARED_SELECTOR = YES; 386 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 387 | GCC_WARN_UNUSED_FUNCTION = YES; 388 | GCC_WARN_UNUSED_VARIABLE = YES; 389 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 390 | MTL_ENABLE_DEBUG_INFO = YES; 391 | ONLY_ACTIVE_ARCH = YES; 392 | SDKROOT = iphoneos; 393 | TARGETED_DEVICE_FAMILY = "1,2"; 394 | }; 395 | name = Debug; 396 | }; 397 | 97C147041CF9000F007C117D /* Release */ = { 398 | isa = XCBuildConfiguration; 399 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 400 | buildSettings = { 401 | ALWAYS_SEARCH_USER_PATHS = NO; 402 | CLANG_ANALYZER_NONNULL = YES; 403 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 404 | CLANG_CXX_LIBRARY = "libc++"; 405 | CLANG_ENABLE_MODULES = YES; 406 | CLANG_ENABLE_OBJC_ARC = YES; 407 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 408 | CLANG_WARN_BOOL_CONVERSION = YES; 409 | CLANG_WARN_COMMA = YES; 410 | CLANG_WARN_CONSTANT_CONVERSION = YES; 411 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 412 | CLANG_WARN_EMPTY_BODY = YES; 413 | CLANG_WARN_ENUM_CONVERSION = YES; 414 | CLANG_WARN_INFINITE_RECURSION = YES; 415 | CLANG_WARN_INT_CONVERSION = YES; 416 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 417 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 418 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 419 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 420 | CLANG_WARN_STRICT_PROTOTYPES = YES; 421 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 422 | CLANG_WARN_UNREACHABLE_CODE = YES; 423 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 424 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 425 | COPY_PHASE_STRIP = NO; 426 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 427 | ENABLE_NS_ASSERTIONS = NO; 428 | ENABLE_STRICT_OBJC_MSGSEND = YES; 429 | GCC_C_LANGUAGE_STANDARD = gnu99; 430 | GCC_NO_COMMON_BLOCKS = YES; 431 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 432 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 433 | GCC_WARN_UNDECLARED_SELECTOR = YES; 434 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 435 | GCC_WARN_UNUSED_FUNCTION = YES; 436 | GCC_WARN_UNUSED_VARIABLE = YES; 437 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 438 | MTL_ENABLE_DEBUG_INFO = NO; 439 | SDKROOT = iphoneos; 440 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 441 | TARGETED_DEVICE_FAMILY = "1,2"; 442 | VALIDATE_PRODUCT = YES; 443 | }; 444 | name = Release; 445 | }; 446 | 97C147061CF9000F007C117D /* Debug */ = { 447 | isa = XCBuildConfiguration; 448 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 449 | buildSettings = { 450 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 451 | CLANG_ENABLE_MODULES = YES; 452 | CURRENT_PROJECT_VERSION = 1; 453 | DEVELOPMENT_TEAM = NS5XW2Q4P8; 454 | ENABLE_BITCODE = NO; 455 | FRAMEWORK_SEARCH_PATHS = ( 456 | "$(inherited)", 457 | "$(PROJECT_DIR)/Flutter/**", 458 | ); 459 | "FRAMEWORK_SEARCH_PATHS[arch=*]" = "$(inherited)"; 460 | INFOPLIST_FILE = Runner/Info.plist; 461 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 462 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 463 | LIBRARY_SEARCH_PATHS = ( 464 | "$(inherited)", 465 | "$(PROJECT_DIR)/Flutter", 466 | ); 467 | PRODUCT_BUNDLE_IDENTIFIER = ng.i.handikraft.flutterRavepayExample; 468 | PRODUCT_NAME = "$(TARGET_NAME)"; 469 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 470 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 471 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 472 | SWIFT_VERSION = 4.0; 473 | TARGETED_DEVICE_FAMILY = 1; 474 | VERSIONING_SYSTEM = "apple-generic"; 475 | }; 476 | name = Debug; 477 | }; 478 | 97C147071CF9000F007C117D /* Release */ = { 479 | isa = XCBuildConfiguration; 480 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 481 | buildSettings = { 482 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 483 | CLANG_ENABLE_MODULES = YES; 484 | CURRENT_PROJECT_VERSION = 1; 485 | DEVELOPMENT_TEAM = NS5XW2Q4P8; 486 | ENABLE_BITCODE = NO; 487 | FRAMEWORK_SEARCH_PATHS = ( 488 | "$(inherited)", 489 | "$(PROJECT_DIR)/Flutter/**", 490 | ); 491 | "FRAMEWORK_SEARCH_PATHS[arch=*]" = "$(inherited)"; 492 | INFOPLIST_FILE = Runner/Info.plist; 493 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 495 | LIBRARY_SEARCH_PATHS = ( 496 | "$(inherited)", 497 | "$(PROJECT_DIR)/Flutter", 498 | ); 499 | PRODUCT_BUNDLE_IDENTIFIER = ng.i.handikraft.flutterRavepayExample; 500 | PRODUCT_NAME = "$(TARGET_NAME)"; 501 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 502 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 503 | SWIFT_VERSION = 4.0; 504 | TARGETED_DEVICE_FAMILY = 1; 505 | VERSIONING_SYSTEM = "apple-generic"; 506 | }; 507 | name = Release; 508 | }; 509 | /* End XCBuildConfiguration section */ 510 | 511 | /* Begin XCConfigurationList section */ 512 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 513 | isa = XCConfigurationList; 514 | buildConfigurations = ( 515 | 97C147031CF9000F007C117D /* Debug */, 516 | 97C147041CF9000F007C117D /* Release */, 517 | ); 518 | defaultConfigurationIsVisible = 0; 519 | defaultConfigurationName = Release; 520 | }; 521 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 522 | isa = XCConfigurationList; 523 | buildConfigurations = ( 524 | 97C147061CF9000F007C117D /* Debug */, 525 | 97C147071CF9000F007C117D /* Release */, 526 | ); 527 | defaultConfigurationIsVisible = 0; 528 | defaultConfigurationName = Release; 529 | }; 530 | /* End XCConfigurationList section */ 531 | }; 532 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 533 | } 534 | --------------------------------------------------------------------------------