• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about Part 2 assignment.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am doing part 2 assignment (Big Cigar) and have a question:
1. So far I have never seen Payment to be an entity, where as this is part of the Domain Model in assignment. I am having hard time imagining how to picture that as an entity.
To me it is more of a transactional attribute, which doesn't or shouldn't have any existence outside the transaction.

What you all suggest?

Thanks in advance.
Robert
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, perhaps you want to capture more details about the payments of the orders (cc or paypal or check, date, owner of the cc if it is the case etc).
I think it can be (0,1)-(1,1) with Orders entity, if there is such entity.
 
Bartender
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It can be an entity-why not? Payment(One to One) is having relationship with Order as well as with Customer(One Customer many Payments). Like many eCommerce systems, you would also like to store/persist the details of payment-don't you think so?
Payment Transaction Request or Payment Transaction response could be transactional in nature.
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the difference between Payment and Transaction? It's the same entity, but a different name. I recommend to use Transaction, since not every Transaction is successful (some of them are failed).

An Order should have a one-to-many association with Transaction.
 
Sharma Ashutosh
Bartender
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think we are talking in somewhat different context. Here is what i have done. There is payment entity (which could be sub classed to credit card or paypal or bank account etc...). System creates a payment request containing the payment method and customer details and send it to Payment Service(Merchant Bank system) and it returns back Payment response which contains transaction code, status, description and some other details which are required in these kind of systems.
I don't think there is any need to make Payment request and Payment response as entity-they are classes but not persistent.
How i am gonna track the payments?
I have the audit and system log where i am recording all such activities for a given order.

How Order and Payment are related?
One order one payment-but both of them are different entities. Note I can follow Dell's style here where you can pay for the order from multiple credit cards or multiple payment ways but i wanted to make architecture simple to some extent.
 
reply
    Bookmark Topic Watch Topic
  • New Topic