Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Api::CreditCardsController#update endpoint #208

Conversation

jordan-brough
Copy link
Contributor

To allow updating a user's credit cards. E.g. updating the name or
address on a credit card from the 'my account' page.

Nest #index tests in their own 'describe' block.
Prep for adding an #update action.
To allow updating a user's credit cards. E.g. updating the name or
address on a credit card from the 'my account' page.
@athal7
Copy link

athal7 commented Jul 24, 2015

👍

@@ -10,6 +10,10 @@ def permitted_attributes
to: :permitted_attributes,
prefix: :permitted

def permitted_credit_card_attributes
permitted_source_attributes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we use this for user facing authorization.

The user can change the following:

[:number,
 :month,
 :year,
 :expiry,
 :verification_value,
 :first_name,
 :last_name,
 :cc_type,
 :gateway_customer_profile_id,
 :gateway_payment_profile_id,
 :last_digits,
 :name,
 :encrypted_data]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Senjai if that's an issue then I don't think it's specific to this PR is it? Those attributes are already exposed via payments_attributes -> source_attributes on the order (when creating a payment). Perhaps we need a separate PR for that if it's an issue?

@Senjai
Copy link
Contributor

Senjai commented Jul 24, 2015

👍

@cbrunsdon
Copy link
Contributor

👍 .
I have a bunch of complaints on the controller/spec's that were there before, but can't fault you for those.

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

Successfully merging this pull request may close these issues.

4 participants