Skip to content

Instantly share code, notes, and snippets.

@Bodacious
Created November 8, 2013 18:18
Show Gist options
  • Select an option

  • Save Bodacious/7375252 to your computer and use it in GitHub Desktop.

Select an option

Save Bodacious/7375252 to your computer and use it in GitHub Desktop.
Rails helpers for paypal payment acceptance methods
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
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