Brad Whitaker (whitaker) wrote in changelog,
Brad Whitaker
whitaker
changelog

ljcom

Module Name: ljcom
Committed By: whitaker
Date: Wed Aug 31 01:53:04 UTC 2005

Modified Files:
---------------
ljcom/cgi-bin/LJ/Pay/Payment: PayItem.pm

Log Message:
------------
Fix refund/revoke support for both RecBill and WFG/Authnet multiplexing

Payment changes:

-- move existing authnet refund logic from BML into a new
LJ::Pay::Payment->authnet_refund API (including its dependency on LWP,
which we use elsewhere in web land)

-- LJ::Pay::Payment->refund method for transaction module transactions (WFG).
Knows how to allocate a global counter ID to construct a settlement ID
and also saves response vars on the payment if it's called as an object
method.

-- when logging authcap vars, prefix var names with authcap:

-- LJ::Pay::Payment->refund_err_str method. returns a string version of
the refund response given a refund $rv

-- LJ::Pay::Payment->refund_is_success method which looks at a refund $rv
and decides if the refund was successful or not.

-- LJ::Pay::Payment->note_refund_vars. logs vars on a payment with the
refund: prefix, just like authcap:

-- LJ::Pay::Payment->payvar_guess_processor method. Used to look at a set
of payvars and decide (if possible) which payment processor was used on
the transaction. This is used when a refund needs to be done and we
need to extract the refund record from a payvar it was stored in.
Authorize.net had one way of doing this, WFG has another.

PayItems changes:

-- revoke_items method which takes a list of items in the payment and
revokes them by calling their individual ->revoke methods.

-- set_status function which sets the 'status' field in the payitems table.

-- product_name object method which simply wraps LJ::Pay::product_name for
ease of reading/writing

-- revoke method. mostly logic taken from paylib's old revoke_payitems
function. properly takes into account the granularity of recbill
transactions by looking recbill_log if necessary to determine how much
time should be revoked rather than relying on the 'qty' int field in
the payitems table, which isn 't nearly granular enough.


To generate a diff of this commit:
cvs rdiff -r1.1 -r1.2 ljcom/cgi-bin/LJ/Pay/Payment/PayItem.pm
http://cvs.livejournal.org/browse.cgi/ljcom/cgi-bin/LJ/Pay/Payment/PayItem.pm.diff?r1=1.1&r2=1.2
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments