Is it possible to set up recurring payments with the Phonegap Paypal Plugin?

I recently set up the Paypal plugin for Phonegap (iPhone) and it is working well for individual payments. However, I am wondering if this method can also be used to initiate recurring payments.

Here is the current code snippet for triggering the payment -

function onDeviceReady()
{
    try {

    // do your thing!
    document.addEventListener(PayPal.PaymentEvent.Success, onPaymentSuccess,false);
    document.addEventListener(PayPal.PaymentEvent.Canceled, onPaymentCanceled,false);
    document.addEventListener(PayPal.PaymentEvent.Failed, onPaymentFailed,false);

    window.plugins.paypal.prepare(PayPal.PaymentType.DONATION);
    window.plugins.paypal.setPaymentInfo({
            paymentCurrency : "USD",
            paymentAmount : "00.10",
            itemDesc : "network cable",
            recipient : "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fd8d9c9f8ea2cccec8c8cccbcdcfcfcfa29f9487bd91948c88996">[email protected]</a>",
            merchantName : "test Account"
    });

    } catch (e) {
        debug.error(e);
    }
}

Answer №1

The original plugin had issues, but it has since been revamped and can now be found at http://github.com/SnareChops/PayPalPlugin. It has undergone successful testing in Sandbox mode.

Unfortunately, recurring payments are not currently supported by the existing PayPal-SDK. If PayPal updates their SDK to include this functionality, it will be integrated into the plugin.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What potential issue could this code be causing with repeated form submissions?

Trying to implement AJAX form submission using PHP code: <!doctype html> <html> <head> <meta charset='utf-8'> <script type='text/javascript' src="./js/jquery.min.js"></script> ...

Display my additional HTML content on the current page

Is it possible for my addon to open a predefined html page in the current window when it is started? And if so, how can this be achieved? Currently, I am able to open my addon page in a new window using the following command: bridge.boot = function() { ...

Looking to prevent editing on a paragraph tag within CKEditor? Simply add contentEditable=false to the

Within my CKEditor, I am in need of some predefined text that cannot be edited, followed by the rest of my content. This involves combining the predefined verbiage (wrapped in a p tag) with a string variable displayed within a specific div in CKEditor. The ...

identifies a data point from a combined dropdown menu

Is there a way to detect a specific value from a multiplied combo box? For example, when the value in one of the combo boxes changes to "2", a component is displayed. However, if the value in another combo box changes to anything other than "2", the compon ...

Stop iScroll from scrolling the listview filter

I have been working on integrating iScroll into my application using the javascript-jquery.mobile.iscroll plugin. My goal is to apply it to enable scrolling for a listview component on a specific page while keeping the filter fixed just below the header, a ...

How jQuery stops the submission of a form

Sample HTML Code <p><select name="status" class="form-control" id="showThisItem"> <option value=""> Select Status </option> <option value="Paid"> Paid </option> <option value="Unpa ...

Tips for creating a captivating full-screen parallax section on your website

Is there a way to make the first section of a parallax site full screen? I've been scouring the internet for a solution to this problem, but I'm not having any luck. Almost every parallax site I come across has their first section full screen, a ...

Following the execution of an AJAX request, the jquery script fails to run

I've encountered an issue with my website that utilizes pagination, filtering with jQuery and AJAX. Everything was functioning smoothly until I decided to switch my links to JavaScript links. When on the homepage without any filtering or pagination a ...

iOS Ionic Camera Plugin

I've encountered a common issue that I haven't been able to solve despite trying many solutions. While running my Ionic app on my IOS device, the camera plugin coding is returning undefined values and getting stuck before reaching the options va ...

Choose a dropdown menu containing JSON data

I am currently working on creating an HTML webpage using data from a JSON file. One issue I am facing is populating a select box with content from the JSON file. Despite trying various solutions from online forums, I have not been successful in getting it ...

Setting up webpack for React to utilize multiple entry points and outputs

Having some trouble configuring the server to handle multiple entries and outputs. The application utilizes Zurb Foundation, jQuery, and React. I'm aiming to exclude jQuery and foundation from the bundle.js file, while also creating a separate bundle ...

javascript code for subtracting values in arrays

I am facing a scenario where I have 3 arrays of the same length. My requirement is to automatically subtract the values in the first two arrays without any user input. If the result of subtraction is negative, I need to identify the index of that array num ...

Initiate an Ajax request solely for the elements currently visible on the screen

I am currently facing an issue that requires a solution. Within our template, there are multiple divs generated with the same classes. Each div contains a hidden input field with the ID of the linked target site. My task is to utilize this ID to make aja ...

I encountered no response when attempting to trigger an alert using jQuery within the CodeIgniter framework

Jquery/Javascript seem to be causing issues in codeigniter. Here is what I have done so far: In my config.php file, I made the following additions: $config['javascript_location'] = 'libraries/javascript/jquery.js'; $config['javas ...

Django views are not receiving multiselect data from Ajax requests

As a newcomer to Django, I am still learning the ropes. One challenge I am facing involves a multiselect list on my webpage. I need to send the selected items to my views for processing, and I attempted to accomplish this using Ajax. However, it seems that ...

Distinguishing Response Headers in XMLHttpRequest and jQuery AJAX FunctionUniqueness:

Hello, I'm facing an issue that is not a duplicate. Here is the code snippet: var data = {'userId': window.cookie.get('userId'), 'sessionId': window.cookie.get('sessionId')} $.post(window.DbUrl + '/t ...

Automatically showcase images from a directory upon webpage loading

Is there a way to modify my code so that the images from the first directory are displayed on the page when it loads, instead of waiting for a menu option to be clicked? The page looks empty until a menu option is selected, and I would like the images to s ...

Exploring the Zoopla API to extract data from JSON using Swift programming language

My attempt to retrieve JSON values from the Zoopla API seems to be different from other APIs. I suspect there is an error in my code that I am unable to identify. Could someone please review my code and point out any missing elements? Regards, import UIK ...

Using the $.ajax or $.get function can only retrieve data from local files

Is there a way to use $.ajax or $.get to fetch responses from an XML file located on a remote server? I've noticed that these functions only seem to work with local files. I am currently developing my websites on a local server with a host address lik ...

Is it possible to transmit an image using ajax and php without using a form or input type file?

Seeking a unique solution here. I am interested in enabling a straightforward image upload directly from a mobile camera. No need for a form, just display the image in a preview and allow the user to click to upload it to a PHP script for processing. I&ap ...