Plugin Directory

Changeset 3401016


Ignore:
Timestamp:
11/22/2025 03:51:39 PM (4 months ago)
Author:
eric1985
Message:

Version 1.1.1 - Fix Venmo payment button to use deep link protocol with fallback

Location:
nonprofit-manager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nonprofit-manager/trunk/includes/payments/npmp-payment-gateways.php

    r3401010 r3401016  
    179179                    }
    180180                    var note = 'Donation';
    181                     var venmoUrl = 'https://venmo.com/' + venmoHandle + '?txn=pay&amount=' + amount + '&note=' + encodeURIComponent(note);
    182                     window.open(venmoUrl, '_blank');
     181                    // Clean up handle - remove @ symbol if present
     182                    var cleanHandle = venmoHandle.replace('@', '');
     183                    // Use venmo:// deep link for mobile, fallback to web for desktop
     184                    var venmoUrl = 'venmo://paycharge?txn=pay&recipients=' + encodeURIComponent(cleanHandle) + '&amount=' + amount + '&note=' + encodeURIComponent(note);
     185
     186                    // Try to open Venmo app, fallback to profile page
     187                    var venmoWindow = window.open(venmoUrl, '_blank');
     188
     189                    // After a short delay, if still here, redirect to Venmo profile page
     190                    setTimeout(function() {
     191                        if (!venmoWindow || venmoWindow.closed || typeof venmoWindow.closed === 'undefined') {
     192                            window.open('https://venmo.com/' + encodeURIComponent(cleanHandle), '_blank');
     193                        }
     194                    }, 1000);
    183195                });
    184196            });
     
    398410        var note = 'Donation';
    399411
    400         var venmoUrl = 'https://venmo.com/' + encodeURIComponent(handle.replace('@', '')) +
    401             '?txn=pay' +
    402             '&amount=' + encodeURIComponent(amount) +
    403             '&note=' + encodeURIComponent(note);
    404 
    405         window.open(venmoUrl, '_blank');
     412        // Clean up handle - remove @ symbol if present
     413        var cleanHandle = handle.replace('@', '');
     414
     415        // Use venmo:// deep link for mobile devices
     416        var venmoUrl = 'venmo://paycharge?txn=pay&recipients=' + encodeURIComponent(cleanHandle) + '&amount=' + amount + '&note=' + encodeURIComponent(note);
     417
     418        // Try to open Venmo app
     419        var venmoWindow = window.open(venmoUrl, '_blank');
     420
     421        // Fallback: After a short delay, if we're still on the page, redirect to Venmo profile
     422        setTimeout(function() {
     423            if (!venmoWindow || venmoWindow.closed || typeof venmoWindow.closed === 'undefined') {
     424                window.open('https://venmo.com/' + encodeURIComponent(cleanHandle), '_blank');
     425            }
     426        }, 1000);
     427
    406428        return false;
    407429    }
  • nonprofit-manager/trunk/nonprofit-manager.php

    r3401010 r3401016  
    33 * Plugin Name: Nonprofit Manager
    44 * Description: Manage memberships, donations, newsletters and events from one plugin.
    5  * Version: 1.1
     5 * Version: 1.1.1
    66 * Author: Eric Rosenberg
    77 * License: GPL-2.0-or-later
  • nonprofit-manager/trunk/readme.txt

    r3401012 r3401016  
    44Requires at least: 6.0
    55Tested up to: 6.7
    6 Stable tag: 1.1
     6Stable tag: 1.1.1
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    9494== Changelog ==
    9595
     96= 1.1.1 =
     97* Fixed: Venmo payment button now uses proper deep link protocol with fallback to profile page
     98
    9699= 1.1 =
    97100* Added: Newsletter template system with Gutenberg editor
     
    126129== Upgrade Notice ==
    127130
     131= 1.1.1 =
     132Bug fix for Venmo payment button functionality. Recommended update.
     133
    128134= 1.1 =
    129135Major update with newsletter templates, improved security, and better UI consistency. Recommended for all users.
Note: See TracChangeset for help on using the changeset viewer.