If you're going to store the credit card with the user (as opposed to
the order) then you should probably inform the user you're doing this
and then just associate with the user when its entered. I wouldn't
mine the payments looking for it - just keep it with user the whole
time. You'll probably want to keep an association with the payment as
well but the user association should occur whenever a new card is
entered and of course it should be updatable in my account or
whatever.
Sean Schofield
-------------------------------------------
Rails Dog LLC
2 Wisconsin Circle, Suite 700
Chevy Chase, MD 20815
voice: (301)560-2000
-------------------------------------------
On Wed, Mar 17, 2010 at 4:03 PM, Mike Totman <mike.totman@gmail.com> wrote:
> Ok, so how do I get the credit card info? I'm a bit of a Rails
> newbie, I can't really navigate all the associations to figure out how
> to connect them. It seems like I need to find an order associated
> with the user and then pull the payment information from that to get
> the credit card. Is that right? Any shortcuts I can use?
>
> Also, should I do this in the show.html.erb or in the
> users_controller.rb?
>
> On Mar 16, 4:48 pm, Sean Schofield <s...@railsdog.com> wrote:
>> What you're trying to do is perfectly fine. We're looking at options
>> to associate the card with the user as part of the core since its such
>> a common use case. We're doing it for a customer now, we'll probably
>> put it in the core once we've actually tested it out "in the wild"
>>
>> I'm really glad people are getting into the credit card profile stuff.
>> Really cool possibilities flow from this!
>>
>> Sean Schofield
>>
>> -------------------------------------------
>> Rails Dog LLC
>> 2 Wisconsin Circle, Suite 700
>> Chevy Chase, MD 20815
>> voice: (301)560-2000
>> -------------------------------------------
>>
>>
>>
>> On Tue, Mar 16, 2010 at 6:45 PM, Mike Totman <mike.tot...@gmail.com> wrote:
>> > We're trying to modify the User/Account page so that it displays more
>> > information than the default. Specifically, one of the things we want to
>> > show is the credit card associated with the user. I think I read somewhere
>> > that this doesn't actually fit the model that Spree uses, that credit cards
>> > are onlyh associated with payments on orders. Is this correct? If so,
>> > should I perhaps get the most recent credit card used? How would I get this
>> > info.
>>
>> > --
>> > Mike
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "Spree" group.
>> > To post to this group, send email to spree-user@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > spree-user+unsubscribe@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/spree-user?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Spree" group.
> To post to this group, send email to spree-user@googlegroups.com.
> To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
No comments:
Post a Comment