[%# View details of a specific shop transaction. # # Authors: # Mark Smith -- TT conversion # # Copyright (c) 2008-2020 by Dreamwidth Studios, LLC. # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. For a copy of the license, please # reference 'perldoc perlartistic' or 'perldoc perlgpl'. # %] [%- sections.title='.title' | ml -%] [%- sections.head = BLOCK %] [% END %] [%- CALL dw.active_resource_group( "foundation" ) -%]

[ << [% '.goback' | ml %] ]

[% '.header.cart' | ml( id = cart.id ) %]

[%- fromuser = u.defined ? u.ljuser_display : dw.ml( '.user.loggedout', { uniq => cart.uniq } ); date = from_epoch( cart.starttime ); pay_method = cart.paymentmethod_visible; pay_string = '/shop/receipt.tt.cart.paymentmethod'; status_string = '/shop/receipt.tt.cart.status'; view_pay_method = dw.ml( pay_method ? "${pay_string}.${pay_method}" : '.cart.notyet' ) -%]
[% '.col.from' | ml %][% fromuser %]
[% '.col.date' | ml %][% date.strftime( "%F %r %Z" ) %]
[% '.col.total' | ml %][% cart.display_total %]
[% '.col.method' | ml %][% view_pay_method %]
[% '.col.uniq' | ml %][% cart.uniq %]
[% '.col.ip' | ml %][% cart.ip %]
[% '.col.status' | ml %] [% "${status_string}.${cart.state}" | ml %]

[% '.subhead.items' | ml %]

[% IF cart.has_items; widget(cart); ELSE %]

[% '.noitems' | ml %]

[% END %] [%# not stripping strings for legacy transaction engines %] [%- IF classname == 'PayPal' -%]

Payer Details

First Name:[% engine.firstname %]
Last Name:[% engine.lastname %]
PayPal Email Address:[% engine.email %]
User Email Address:[% cart.email %]

raw: pp_trans (PayPal transactions)

[%- IF engine.ppid.defined -%] [% dump( 'SELECT * FROM pp_trans WHERE ppid = ?', engine.ppid ) %] [%- ELSE -%]

[% '.error.notransid' | ml %]

[%- END -%]

raw: pp_log (PayPal raw log)

[%- IF engine.ppid.defined -%] [% dump( 'SELECT * FROM pp_log WHERE ppid = ?', engine.ppid ) %] [%- ELSE -%]

[% '.error.notransid' | ml %]

[%- END -%] [%- ELSIF classname == 'GoogleCheckout' -%]

GCO Payer Details

Contact Name:[% engine.contactname %]
GCO Email Address:[% engine.email %]

raw: gco_log (GCO raw)

[%- IF engine.gcoid.defined -%] [% dump( 'SELECT * FROM gco_log WHERE gcoid = ?', engine.gcoid ) %] [%- ELSE -%]

[% '.error.notransid' | ml %]

[%- END -%] [%- ELSIF classname == 'CreditCard' -%]

raw: cc_trans (raw transaction data)

[% dump( 'SELECT * FROM cc_trans WHERE cartid = ?', cart.id ) %]

raw: cc_log (raw server query/response log)

[% dump( 'SELECT * FROM cc_log WHERE cartid = ?', cart.id ) %] [%- ELSIF classname == 'Stripe' -%]

Stripe extra details not yet implemented

[%- ELSIF classname == 'CheckMoneyOrder' -%]

[% '.header.payer' | ml %]

[% '.col.email' | ml %][% cart.email %]
[% IF is_pending( cart.state ) %]

[% '.header.received' | ml %]

[% dw.form_auth %]

[%- form.select( label = dw.ml( '.label.paymentmethod' ), id = 'paymentmethod', name = 'paymentmethod', items = [ 'cash', dw.ml( '.select.cash'), 'check', dw.ml( '.select.check'), 'moneyorder', dw.ml( '.select.moneyorder'), 'other', dw.ml( '.select.other') ] ) -%]

[%- form.textarea( label = dw.ml( '.label.paymentnotes' ), id = 'notes', name = 'notes', rows = 5, cols = 40 ) -%]

[%- form.submit( name = "record_cmo", value = dw.ml( '.btn.receive' ) ) -%]

[% ELSE %]

[% '.header.payment' | ml %]

[% '.col.method' | ml %] [% cmo_info.paymentmethod %]
[% '.col.notes' | ml %] [% cmo_info.notes ? cmo_info.notes : dw.ml( '.nonotes' ) %]
[% END %] [% END %]