Created
November 8, 2013 18:18
-
-
Save Bodacious/7375252 to your computer and use it in GitHub Desktop.
Rails helpers for paypal payment acceptance methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def paypal_acceptance_badge | |
| path = "https://www.paypal.com/webapps/mpp/paypal-popup" | |
| im_path = "https://www.paypalobjects.com/webstatic/mktg/logo/AM_SbyPP_mc_vs_dc_ae.jpg" | |
| link_to(path, title: "How PayPal Works", id: "paypal_acceptance_badge") do | |
| image_tag(im_path, border: "0", alt: "PayPal Acceptance Mark") | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| paypalAcceptanceBadge = | |
| init: -> | |
| $('body').on "click", '#paypal_acceptance_badge', (e) -> | |
| e.preventDefault() | |
| window.open('https://www.paypal.com/webapps/mpp/paypal-popup', | |
| 'WIPaypal', | |
| 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, | |
| resizable=yes, width=1060, height=700'); | |
| jQuery -> | |
| paypalAcceptanceBadge.init() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment