Code

Discussion on PayNow! - jQuery PayPal Plugin

Discussion on PayNow! - jQuery PayPal Plugin

Cart 233 sales

flGravity supports this item

Supported

This author's response time can be up to 5 business days.

60 comments found.

Hi

How can I have subscribe with the button “double” and NO option?

Thanks

Fixed it. Great script btw.

I just have another question. Is there possible for user pick 2,3 items?

item one $5 item two $4

And Total $9

User can pick 1 or 2 items. Maybe add a Checkbox?

Hi!

Not sure if this is possible with a button. As this is more likely a _cart where you can add few items with own prices and paypal will calculate cart totals.

Hi, This plugin can be embed into any website? I’m working a PHP Laravel MySql project. this plugin can be embeded?

Hi! You can embed it in any website as any other jquery plugin. Make sure that your site has jquery library, then link jquery.payonow.min.js and css and you are done.

I need it most for subscriptions. It manage to create,suspend,cancel and reactivate subscriptions?

No, with paynow plugin you can just create a subscrube button. Here is how button should look like

<button id="pn7" class="paynow-button
" 
    data-business="example@gmail.com" 
    data-item_name="Super Plan" 
    data-currency_code="USD" 
    data-src="1" 
    data-a3="9.99" 
    data-p3="1" 
    data-t3="M" 
    >Subscribe
</button>

PayPal variables that you can use are here https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#recurring-payment-variables

How can we force the cart script to show the new PayPal mobile checkout form?

See image: http://i.imgur.com/f0adHXt.png

When I test the cart demo, I get the old PP checkout form – but if I load the PayPal url (from the demo page) directly into the iPhone, I get the modern checkout page.

Any solution you can find?

Thanks -

Hello,

For checkout I redirect to https://www.paypal.com/cgi-bin/webscr as can be seen in this code

// create hidden form
        this.form = $('<form/>');
        this.form.attr({
            'action':'https://www.paypal.com/cgi-bin/webscr', 
            'method':'POST', 
            'target': this.options.checkoutTarget
        }).hide();

so this is what paypal suggests https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/

I will look maybe there is some special attribute for modern checkout page. I will update you as soon as I will have any info.

Hi

I am willing to use this script, Will it allow paypal adaptive payment

Hi! I think it’s not possible.

Hi flGravity. I love the plugin! One problem, though. data-item-name doesn’t populate the description field on the paypal website. it’s left blank so the user has to enter it. is there something wrong with the parameter?

NVM! Figured it out!

Hello, sorry for asking again… I ve tried to use CDN, as i dont know how install jquery on site…I have pasted in HEAD:

<link rel=”stylesheet” href=”css/paynow.css” type=”text/css”>

<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script>

<script type=”text/javascript” src=”js/jquery.paynow.min.js”></script>

<script type=”text/javascript”> $(document).ready(function(){ $(’.my-buttons’).paynow({ type: ‘buynow’, style: ‘default’ }, {business: ‘contact@domain.com‘}); }); </script>

And then the button in content fillled with the info, but nothing is happening…

The button is there just reacting on mouse… Please, could you provide a solution? Thanks!

Hi! I have to look on that because if you have WP site then you don’t need to link external jQuery. Also an order in which you add JS files and plugin init code is also important. If possible please provide me with your sitre URL and I will check it.

I am working on a mobile app with jquery. I installed the Paypal app and works great except. I only want the Donate feature on the Donate page. A Blue button shows on Homepage to. Code below:

<!DOCTYPE html>

<head> <meta charset=”UTF-8”> <title>ReCreation USA</title> <link rel=”stylesheet” href=”themes/rcTheme2016.min.css” /> <link rel=”stylesheet” href=”themes/jquery.mobile.icons.min.css” /> <link rel=”stylesheet” href=”http://code.jquery.com/mobile/1.4.5/jquery.mobile.structure-1.4.5.min.css” /> <script src=”http://code.jquery.com/jquery-1.11.1.min.js”></script> <script src=”http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js”></script> <link href=”css/customstyles.css” rel=”stylesheet” type=”text/css”/> <link rel=”stylesheet” href=”css/paynow.css” type=”text/css”> <script type=”text/javascript” src=”js/jquery.paynow.min.js”></script>

<script type=”text/javascript”> $(document).ready(function(){ $(’#pn6’).paynow({ type: ‘donate’, style: ‘square’ }); }); </script>

</head>

<center>

ReCreation USA

</center>
  • RC ON TOUR

  • RC CAST

  • DONATE

<center></center>

RC ON TOUR

<script>!function(c,b,a){function d(h){var e=document.getElementById(“upto-calendar-container-”+c),f=document.createElement(“SCRIPT”),g=”https://upto.com/js/plugin.js”;f.onreadystatechange=function(){if(f.readyState===”loaded”||f.readyState===”complete”){f.onreadystatechange=null;h()}};f.onload=function(){h()};f.setAttribute(“src”,g);e.parentNode.insertBefore(f,e)}d(function(){upto.init©})}(“B4KO”);</script>

RC CAST

KATIE CONNER, York, PA

Katie studied voice with Joanne Kloss Abrom (RC 11 & 12) and actually sent an audition application early in the casting process. The application, though was lost and only a call from Joanne to Mr. Muller prompted the ‘discovery’ of Katie’s application in our server! Katie studied at The Sight and Sound Performing Arts Conservatory, was featured in Choir and Show Choir all 4 years of high school and even has training in Ballroom Dance! Katie will sing alto for RC 41 and serve as music coach!

NICK MAROLF, Bloomsburg, PA

Well, Nick is the twin brother of RC 40 cast member Jordan Marolf! And Nick worked with Mr. Muller in his high school production of “Grease.” He participated all 4 years in musical productions, enjoyed roles in Consistory and earned vocal scholarships at summer conservatory camps. Nick is taking time off from his studies at Lock Haven University, where he is studying physical education, to sing lead tenor for RC 41!

T.J. MARTIN, Port Trevorton, PA

TJ lives in Port Trevorton, so, well…ya’ know! He’s been aware of the group his whole life and became more intrigued when Mr. Muller assisted with his senior year musical, “The Music Man.” TJ worked at Hilsher’s Store (EVERY RC oldie will know Hilshers.) TJ has been a musician most his life participating in band since grade 5 and in the Honors Choir at Selinsgrove his Junior and Senior year. TJ will serve as the lighting tech for the secular show and lend his tenor voice to the sacred program.

TARA WANDS, Milton, PA

Tara is a recent graduate from Milton Area High School where she participated in four years of plays and musicals. Tara was featured in leading roles both her junior and senior year. She has participated in District and Regional choirs and was an active member of her school’s concert choir and show choir as well her church choir; all lead by Russ Wynn, a personal friend of the Muller family. Away from the stage, she spent a lot of her free time volunteering at her church’s daycare throughout her senior year. Tara sings soprano for RC 41!

AUSTIN KERETZMAN, Quarryville, PA

Get this…Austin was a voice student of Jennifer Eshelman Shaffer (RC 3-6) performed with Randy Robbins (RC 32-36) and Adam Dienner (RC 31-33) AND heard about RC from Jenn Burkholder (RC 32 & 33) who worked with Austin’s father, a pastor! Whew! Austin is no stranger to the idea of mission and leadership as he has served as youth leader, drum major for the marching band and singer for his church’s praise team. Austin will sing baritone for RC 41!

MADISON REED, Mifflinburg, PA

Madison is a student of Ballet at Stiefel Steps in Lewisburg, PA. Ballerina Erin Stiefel, Madison’s teacher, is also Re-Creation’s ballet instructor. Madison has performed with her school’s Choir and Chamber Choir, received credit for college-level acting courses and been dancing since she was 4 years old. Madison will be singing soprano for RC 41 and serve as the group’s dance captain.

TIRUS TWYNE, Mt. Carmel, PA

After performing and singing in high school, Tirus auditioned for Re-Creation at the behest of his choir teacher. Now in his 5th year traveling the nation and serving our veterans, Tirus leads the group as the Re-Creation road manager! He recently helped produce his first full-length gospel solo CD project Black / White which is available now. Tirus sings Bass for RC 41!

CAITLIN BECKETT, Austintown, OH

At the suggestion of her pastor, Matt Darrin (RC 16 and 19), his wife Janel (RC 19) and fellow praise band member Carolyn Baer (RC 39), Caitlin auditioned for Re-Creation in May and is thrilled to be singing alto with RC 41! She has completed two years of schooling at Youngstown State University toward a degree in music education.

JON HEPLER, New Columbia, PA

Jon is the latest in a long line of talented cast members to come from the Milton Area High School. The secret? Russ Wynn. A dynamic vocal teacher, personal friend of the Muller’s and part time RC vocal coach. Jon’s work at Milton has been exemplary in featured roles in his senior musical and with the school’s show choir. He also plays lead guitar and sings with a local rock band. Jon will sing tenor with RC 41!

DONATE RC

Re-Creation USA, Inc.

P.O. Box 220, Port Trevorton, PA 17864
570.374.1909 Phone 570.374.6471 Fax

<button id=”pn6” class=”paynow-button” data-business=”re-creationusa@verizon.net” data-item_name=”Please donate!” data-lc=”US” data-no_note=”0” data-currency_code=”USD”>Donate! </button>

Hi! And what exactly does not work? The code that you provided looks like to be ok.

Hello good afternoon.

First I want to thank you for your feedback.

Another thing I realized, as my site is Twitter Bootstrap-it uses JQuery and when I remove the line below the button functions normally but when I put the line code it stops working. Why does it happen?

<!- jQuery -> <script src=”js/jquery.js”></script>

When I remove that line the button behaves as expected and animations that rely on jQuery are disabled.

Another point that seems important to me is that when they procure I click the button it activates the response message sent from my form. It would be the line below.

Once again thank you for the support and feedback.

Hello! Probably it happens because you include jQuery library (jquery.js) second time. Jquery should be included only once before all scripts.

Hello my friend.

My name is David Mota and am Brazilian and I found your module for payment and saw that it carries the Paypal account and how not find anything on the internet I decided to purchase this module.

I bought this module payment because I have a Paypal account in Brazil. I wonder if you can help me. I have a website in Bootstrap and would like to integrate this module on my website. What can you do for me?

The button that I created looked like this:

<form target=”paypal” action=”https://www.paypal.com/cgi-bin/webscr” method=”post”> <input type=”hidden” name=”cmd” value=”_s-xclick”> <input type=”hidden” name=”hosted_button_id” value=”9PBEHBYZJLD24”> <input type=”image” src=”https://www.paypalobjects.com/pt_BR/i/btn/btn_cart_LG.gif” border=”0” name=”submit” alt=”PayPal – A maneira fácil e segura de enviar pagamentos online!”> \\ </form>

I just need a guide to adjust my button to your method. Thank you!

Thanks for contacting me. I see you have configured your button in Paypal.com account (hosted_button_id=), so I can’t see what settings it has. Please check my plugin demo – http://plugins.gravitysign.com/paynow/ and just take first example as a guide. Also please read plugin documentation. It explains what parameters you should set to get started.

If you won’t be able to do this please contact me again!

regarding this item i am interested in purchasing but as i am selling graphic designs i wonder if i can use this so people would automatically get to a form they can submit about what they would like in their designs

Hi,

If I don’t get your question right, please correct me!

Yes, you can configure Paynow! so that when someone completes payment they are redirected back to your site, to the form if you like. Parameter that you should add is called “data-return=URL”, where URL is some page of your site. Also there are additional parameters that can help you track payments – notify_url, return, cancel_return

Also my plugin allows to have a dropdown or radio buttons along with PayNow! button itself to let people do some selection and adjust price respectively.

Hey, thx for this pluggin. it works perfectly !

I have a question : can we send the UserdID and promoID at Paypal with data-XX ? To retrieve the information through the NPI Paypal ?

there may be another method …

Thanks

Hi! Paypal does not have userID or promoID variables. What it has is so called “passthrough” variables that you can use to send any custom info and paypal and it will simply forward them to the notification URL. These variables are

custom
item_number
invoice

see https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#id08A6HH00W2J

With my PayNow! plugin you can set them via data-custom=”” or data-invoice=”” attributes

great thx you !!

Hi,

How can i pass a javascript variable and use its value in data-amount input, within the buynow button code?

For example, for my variable “total_cost” it would be something like…

data-amount=”document.getElementById(“pn1”).innerHTML = total_cost;”

Hi! You should use plugin API to set variables that will be passed to paypal when someone presses PayNow! button. Here is how you can read input from textfield and pass it as amount to paypal.

// get PayNow! API object  
var api = $('#pn1').data('paynow-api');  

// let's read amount from <input> and pass it to paypal
var amont = $('#amount_input').val();
api.setVar('amount', parseFloat(amont));

you can read more about how to use plugin API in section “5. Plugin API” in documentation

Hi! I’m trying to do some form validation prior to sending the customer to PayPal, but once the validation check is fine the button does not work (nothing happens), any suggestions as to how to get it working? Where would you recommend doing the validation if not in the beforeSubmit?

            
var paypalbutton = $('#paypaldeposit');
paypalbutton.paynow({
 type: 'buynow',
 style: 'double',
 beforeSubmit: function(){
  bookingform = $("#booking-form");
   if( ! bookingform.valid() ){
    return false;
   }
   if( $('#idtermsconditions').val() == 'NOTAGREED'  ){
     alert("Please agree to our terms & conditions first! Thank you!");
    return false;
   }
 }
Thanks in advance!
Hi! Value returned by beforeSubmit() callback doesn’t change button action. To do what you want you should use plugin API. Here is how
// get PayNow! API object  
var api = $('#pn1').data('paynow-api');  
api.enable(); 
// or
api.disable();

hi there, i purchased your paypal cart and wondered if I can add this to it

Hi! no, you can’t. This is “buy now” button which works differently as a cart.

Hi, how can add tax (5%) to total value ? I test with “tax” and “tax_rate” but doesn´t work.

My purchase code is: b2bd32d7-b9fa-459d-a659-40beb341df31

why data-tax_rate not work for me ?

or how can i do this : subtotal = total + shipping , now total = subtotal * 0.05 , i have subtotal ok, how can i do total ?

I have replied in another comment.

Hello, How can Add TAX (5%) ??? my code is :

<button id=”pn1” class=”paynow-button” data-business=”example@gmail.com” data-item_name=”iTrackPRO AVL” data-amount=”124” data-shipping=”22” tax=”5” data-quantity=”1” data-currency_code=”USD”>Buy Now

shipping is working but i add code : tax and tax_rate but doesnt work

tax_rate doesn´t work for me

or how can i do this : subtotal = total + shipping , now total = subtotal * 0.05 , i have subtotal ok, how can i do total ?

If you can’t set this via tax_rate attribute, then better contact Paypal support, maybe they will help you configure your Profile based taxes.

I just bought the plug and works fine (per documentation) in IE, but in Chrone the button does nothing. I tried debugging the “console” and see if any issues but not response at all. without any changes, i try it in IE and works fine. Please advise so i can rate this plug.

I figure out the issue. Tracing the IE and Chrome, for some reason the Chrome is set to “touchend” listerner instead of “click”

I hacked the javascript file and just set it to “click”. if you have a better solution or a fix please keep everyone in the loop.

IE- sees ‘click’ Chrome – sees ‘touchend’

so if you are using mouse the click never triggers.

// check click event for device
var click_event = 'click' // (typeof window.ontouchend !== 'undefined') ? 'touchend' : 'click';
console.log(click_event);

Hi! Do you mean button didn’t work on Chrome mobile?

Hi I love this plugin. I’ve got it all set up and I just have one question. I have a button already created on my paypal acct that calculates a shipping charge when an order is placed. How can I have the plugin do the same? here’s my paypal code.

<form action=”https://www.paypal.com/cgi-bin/webscr” method=”post” target=”_top”> <input type=”hidden” name=”cmd” value=”_s-xclick”> <input type=”hidden” name=”hosted_button_id” value=”DGB2FEM7E33SJ”> <input type=”image” src=”https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif” border=”0” name=”submit” alt=”PayPal – The safer, easier way to pay online!”> \\ </form>

Hi fiGravity I think I’ve figured it out. I just used

data-shipping=”5.95”

thx in advance

OK. Great!

hi before i buy i was looking at demo and the documentation but i don’t see away for being able to pick multiple items all your examples based on selecting 1 item but if customer wanted to select an amount of items?

hehe stupid me how will it work when i don’t have the plugin lol, i just copied and pasted the above in a html page then wondered why not working…sorry not my day:)....could you add a demo on the test page to see it working ?

thank you will try it out

I ran into a snag with the plugin, and can’t figure it out :/

The Issue: When I click on the button, it doesn’t do anything. On mouseover, the tooltip pops up so I know the Init code is working.

My Code (these are all in the <head>):

<!- Pay Now CSS ->
<link rel="stylesheet" href="css/paynow.css" />
<!- Library ->
<script src="js/jquery-1.11.1.min.js"></script>
<!- Pay Now ->
<script src="js/jquery.paynow.min.js"></script>
<!- Paypal Plugin ->
    <script type="text/javascript">  
        $(document).ready(function(){  
            $('#pn1').paynow({
                type: 'donate',  
                style: 'default',
                business: 'correctemail@domain.com',
                tooltip: 'Donate safely with PayPal!'
            }); 
            $('#pn2').paynow({
                type: 'donate',  
                style: 'default',
                business: 'differentemail@domain.com’,
                tooltip: ‘Donate safely with PayPal!’
            });  
        });  
    </script>

I tried CDN versions, and earlier versions of jQuery. What am I missing?

note – no JavaScript errors are being thrown in my dev tool

note 2 – I’m using Bootstrap

To pass paypal variables via init, you should add second argument to $.paynow(), like so

 $('#pn1').paynow({
 type: 'donate',  
 style: 'default',
 tooltip: 'Donate safely with PayPal!'
 }, {business: 'correctemail@domain.com'}); 

Ahh, gotcha. Thank you!

No problem!

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey