Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Scoping in CheckoutController #91

Open
clemens opened this issue Oct 21, 2012 · 1 comment
Open

Scoping in CheckoutController #91

clemens opened this issue Oct 21, 2012 · 1 comment

Comments

@clemens
Copy link

clemens commented Oct 21, 2012

There's something that worries me about this extension: It adds lots of unscoped, private methods to the CheckoutController (all_opts, order_opts etc.). This could lead to big trouble if other extensions add methods with the same names to the CheckoutController.

I see two possible solutions:

  • The proper way would probably be to extract one or multiple actual objects that handle the PayPal behavior and are used in the controller.
  • The other – and potentially easer – solution would be to just prefix all methods with paypal_ or paypal_express (like the public methods are).

I could provide a pull request for either solution if need be. The second option could be done quickly but I'd need time to implement the first.

Let me know what you think.

Cheers.

@JDutil
Copy link
Member

JDutil commented Nov 20, 2012

Could you provide a pull request for your second choice prefixing the methods with paypal_ please?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants