udaymrx / flutter_venmo_payment

A flutter plugin with Venmo payment (via app switch) integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

venmo_payment

Flutter Plugin for sending Venmo Requests

Usage

To initialize Venmo, place this somewhere in the beginning of your flutter application:

import 'package:venmo_payment/venmo_payment.dart';
VenmoPayment.initialize(appId: "####", secret: "********", name: "App Name");

Then to create a payment via app switch:

String venmoResponse = await VenmoPayment.createPayment(
  recipientUsername: 'some-person',
  fineAmount: 1,
  description: 'Testing Venmo from Plugin',
);

iOS

You must add the following 2 key+value pairs to your info.plist

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <string>venmo####</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>venmo####</string>
    </array>
  </dict>
</array>

(replacing #### with you venmo appId) and

<key>LSApplicationQueriesSchemes</key>
<array>
  <string>venmo</string>
</array>

You will also need to add the following to your AppDelegate.swift file in order for your app to listen to callbacks from the Venmo app

override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
  if Venmo.sharedInstance().handleOpen(url) {
    return true
  }
  else {
    return false
  }
}

Android

Nothing needed!

About

A flutter plugin with Venmo payment (via app switch) integration

License:Other


Languages

Language:Java 58.7%Language:Dart 15.0%Language:Swift 13.1%Language:Ruby 11.7%Language:Objective-C 1.5%