Last active
August 29, 2015 14:15
-
-
Save mrbrdo/125a32aae3d3d3cee510 to your computer and use it in GitHub Desktop.
Apparently PayPal lets junior-level interns design APIs used by millions...
This file contains 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_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