| as yet unclassified |
| confirmContentsOfCart
|
^ self call:
((WAStoreCartConfirmation new cart: cart)
addMessage: 'Please verify your order:')
|
| displayConfirmation
|
self inform: 'Your fish is on its way.'
|
| fillCart
|
self call: (WAStoreFillCart new cart: cart)
|
| getAddressWithMessage: aString
|
^ self call:
((WAStoreAddressEditor new
validateWith: [:a | a validate])
addMessage: aString)
|
| getBillingAddress
|
^ self getAddressWithMessage: 'Please enter your billing address:'.
|
| getPaymentInfo
|
^ self call:
((WAStorePaymentEditor new
validateWith: [:p | p validate])
addMessage: 'Please enter your payment information:')
|
| getShippingAddress
|
^ self getAddressWithMessage: 'Please enter your shipping address:'.
|
| go
|
| shipping billing creditCard |
cart _ WAStoreCart new.
self isolate:
[[self fillCart.
self confirmContentsOfCart]
whileFalse].
self isolate:
[shipping _ self getShippingAddress.
billing _ (self useAsBillingAddress: shipping)
ifFalse: [self getBillingAddress]
ifTrue: [shipping].
creditCard _ self getPaymentInfo.
self shipTo: shipping billTo: billing payWith: creditCard].
self displayConfirmation.
|
| shipTo: shippingAddress billTo: billingAddress payWith: aCreditCard
|
"no-op"
|
| useAsBillingAddress: anAddress
|
^ self confirm: 'Do you wish to use ', anAddress street printString, ' as your billing address?'
|