Skip to content

Instantly share code, notes, and snippets.

@mrbrdo
Last active August 29, 2015 14:15
Show Gist options
  • Save mrbrdo/125a32aae3d3d3cee510 to your computer and use it in GitHub Desktop.
Save mrbrdo/125a32aae3d3d3cee510 to your computer and use it in GitHub Desktop.
Apparently PayPal lets junior-level interns design APIs used by millions...
def paypal_business_param
# as if the name of this type isn't bad enough
if params[:txn_type] == 'recurring_payment_suspended_due_to_max_failed_payment'
params[:receiver_email]
else
params[:business]
end
end
def paypal_subscr_id_param
if params[:txn_type] == 'recurring_payment_suspended_due_to_max_failed_payment'
params[:recurring_payment_id]
else
params[:subscr_id]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment