[open-ils-commits] r19444 - in branches/rel_2_1/Open-ILS: examples src/perlmods/lib/OpenILS/Application/Circ src/sql/Pg src/sql/Pg/upgrade (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Feb 14 16:29:27 EST 2011
Author: erickson
Date: 2011-02-14 16:29:22 -0500 (Mon, 14 Feb 2011)
New Revision: 19444
Added:
branches/rel_2_1/Open-ILS/src/sql/Pg/upgrade/0486.schema.mccp-order-number.sql
Modified:
branches/rel_2_1/Open-ILS/examples/fm_IDL.xml
branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm
branches/rel_2_1/Open-ILS/src/sql/Pg/002.schema.config.sql
branches/rel_2_1/Open-ILS/src/sql/Pg/080.schema.money.sql
Log:
back-port 19443: capture credit card order_number for online payments
Modified: branches/rel_2_1/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/rel_2_1/Open-ILS/examples/fm_IDL.xml 2011-02-14 21:06:51 UTC (rev 19443)
+++ branches/rel_2_1/Open-ILS/examples/fm_IDL.xml 2011-02-14 21:29:22 UTC (rev 19444)
@@ -1571,6 +1571,7 @@
<field name="cc_first_name" reporter:datatype="text"/>
<field name="cc_last_name" reporter:datatype="text"/>
<field name="cc_number" reporter:datatype="text"/>
+ <field name="cc_order_number" reporter:datatype="text"/>
<field name="cc_type" reporter:datatype="text"/>
<field name="cc_processor" reporter:datatype="text"/>
<field name="expire_month" reporter:datatype="int" />
Modified: branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm
===================================================================
--- branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm 2011-02-14 21:06:51 UTC (rev 19443)
+++ branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm 2011-02-14 21:29:22 UTC (rev 19444)
@@ -143,7 +143,7 @@
my %orgs;
# unless/until determined by payment processor API
- my ($approval_code, $cc_processor, $cc_type) = (undef,undef,undef);
+ my ($approval_code, $cc_processor, $cc_type, $cc_order_number) = (undef,undef,undef, undef);
my $patron = $e->retrieve_actor_user($user_id) or return $e->die_event;
@@ -302,6 +302,7 @@
$approval_code = $cc_payload->{"authorization"};
$cc_type = $cc_payload->{"card_type"};
$cc_processor = $cc_payload->{"processor"};
+ $cc_order_number = $cc_payload->{"order_number"};
$logger->info("Credit card payment for user $user_id succeeded");
}
} else {
@@ -346,6 +347,7 @@
}
$payment->approval_code($approval_code) if $approval_code;
+ $payment->cc_order_number($cc_order_number) if $cc_order_number;
$payment->cc_type($cc_type) if $cc_type;
$payment->cc_processor($cc_processor) if $cc_processor;
$payment->cc_first_name($cc_args->{'billing_first'}) if $cc_args->{'billing_first'};
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/002.schema.config.sql 2011-02-14 21:06:51 UTC (rev 19443)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/002.schema.config.sql 2011-02-14 21:29:22 UTC (rev 19444)
@@ -70,7 +70,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0485'); -- dbs
+INSERT INTO config.upgrade_log (version) VALUES ('0486'); -- berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: branches/rel_2_1/Open-ILS/src/sql/Pg/080.schema.money.sql
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/080.schema.money.sql 2011-02-14 21:06:51 UTC (rev 19443)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/080.schema.money.sql 2011-02-14 21:29:22 UTC (rev 19444)
@@ -630,6 +630,7 @@
cc_processor TEXT,
cc_first_name TEXT,
cc_last_name TEXT,
+ cc_order_number TEXT,
expire_month INT,
expire_year INT,
approval_code TEXT
Copied: branches/rel_2_1/Open-ILS/src/sql/Pg/upgrade/0486.schema.mccp-order-number.sql (from rev 19443, trunk/Open-ILS/src/sql/Pg/upgrade/0486.schema.mccp-order-number.sql)
===================================================================
--- branches/rel_2_1/Open-ILS/src/sql/Pg/upgrade/0486.schema.mccp-order-number.sql (rev 0)
+++ branches/rel_2_1/Open-ILS/src/sql/Pg/upgrade/0486.schema.mccp-order-number.sql 2011-02-14 21:29:22 UTC (rev 19444)
@@ -0,0 +1,7 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0486');
+
+ALTER TABLE money.credit_card_payment ADD COLUMN cc_order_number TEXT;
+
+COMMIT;
More information about the open-ils-commits
mailing list