[open-ils-commits] [GIT] Evergreen ILS branch master updated. 4fee07d5c7be39a21fa6df602c9b6855d3315fb1
Evergreen Git
git at git.evergreen-ils.org
Mon Jul 30 18:57:00 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 4fee07d5c7be39a21fa6df602c9b6855d3315fb1 (commit)
from 564f768051caacc79c1b7fdfc31d0d7feb6b9dd2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4fee07d5c7be39a21fa6df602c9b6855d3315fb1
Author: Jeff Godin <jgodin at tadl.org>
Date: Tue Jun 19 12:31:03 2012 -0400
Support SIP payment type 02 - credit card
Record SIP payments with payment type 02 as credit_card_payment in
Evergreen.
Signed-off-by: Jeff Godin <jgodin at tadl.org>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
index 4774174..75a8b53 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
@@ -466,9 +466,9 @@ sub pay_fee {
$xact->sip_fee_type($fee_type);
$xact->transaction_id($trans_id);
$xact->fee_id($fee_id);
- # We don't presently use these, but we might in the future.
- $xact->patron_password($patron_pwd);
$xact->sip_payment_type($pay_type);
+ # We don't presently use this, but we might in the future.
+ $xact->patron_password($patron_pwd);
$xact->do_fee_payment();
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/FeePayment.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/FeePayment.pm
index d0b3fa4..b9c0654 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/FeePayment.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/FeePayment.pm
@@ -189,9 +189,19 @@ sub do_fee_payment {
sub pay_bills {
my ($self, $paymentref) = @_;
my $user = $self->patron->{user};
- return $U->simplereq('open-ils.circ', 'open-ils.circ.money.payment', $self->{authtoken},
- { payment_type => "cash_payment", userid => $user->id, note => "via SIP2",
- payments => $paymentref}, $user->last_xact_id);
+ if ($self->sip_payment_type eq '02') {
+ # '02' is "credit card"
+ my $transaction_id = $self->transaction_id ? $self->transaction_id : 'Not provided by SIP client';
+ return $U->simplereq('open-ils.circ', 'open-ils.circ.money.payment', $self->{authtoken},
+ { payment_type => "credit_card_payment", userid => $user->id, note => "via SIP2",
+ cc_args => { approval_code => $transaction_id, },
+ payments => $paymentref}, $user->last_xact_id);
+ } else {
+ # record as "cash"
+ return $U->simplereq('open-ils.circ', 'open-ils.circ.money.payment', $self->{authtoken},
+ { payment_type => "cash_payment", userid => $user->id, note => "via SIP2",
+ payments => $paymentref}, $user->last_xact_id);
+ }
}
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/perlmods/lib/OpenILS/SIP.pm | 4 ++--
.../lib/OpenILS/SIP/Transaction/FeePayment.pm | 16 +++++++++++++---
2 files changed, 15 insertions(+), 5 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list