IDEMPIERE-462 Ticket #1001503: Credit Cards Online - support online credit payment, include copyright text, use translate message, fix credit card online processing issues

This commit is contained in:
Elaine Tan 2012-11-02 18:27:14 +08:00
parent 30689cf4df
commit 236e06c7cc
11 changed files with 461 additions and 37 deletions

View File

@ -0,0 +1,167 @@
-- Nov 2, 2012 12:05:55 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=1,Updated=TO_DATE('2012-11-02 12:05:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3112
;
-- Nov 2, 2012 12:06:35 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=1,Updated=TO_DATE('2012-11-02 12:06:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3353
;
-- Nov 2, 2012 12:07:50 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=1,Updated=TO_DATE('2012-11-02 12:07:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3466
;
-- Nov 2, 2012 12:10:27 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET IsCentrallyMaintained='N', Name='Void It',Updated=TO_DATE('2012-11-02 12:10:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200723
;
-- Nov 2, 2012 12:10:27 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field_Trl SET IsTranslated='N' WHERE AD_Field_ID=200723
;
-- Nov 2, 2012 12:10:56 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET DisplayLogic='@TenderType@=C & @IsOnline@=Y & @IsVoided@=N & @TrxType@=A & @IsDelayedCapture@=N',Updated=TO_DATE('2012-11-02 12:10:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200723
;
-- Nov 2, 2012 12:20:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=2,Updated=TO_DATE('2012-11-02 12:20:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4363
;
-- Nov 2, 2012 12:21:07 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=2,Updated=TO_DATE('2012-11-02 12:21:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4039
;
-- Nov 2, 2012 12:21:09 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=2,Updated=TO_DATE('2012-11-02 12:21:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200631
;
-- Nov 2, 2012 4:17:53 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Column SET FieldLength=100,Updated=TO_DATE('2012-11-02 16:17:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5058
;
-- Nov 2, 2012 4:17:59 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
ALTER TABLE C_PaymentProcessor MODIFY UserID NVARCHAR2(100)
;
-- Nov 2, 2012 4:18:04 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
ALTER TABLE C_PaymentProcessor MODIFY UserID NOT NULL
;
-- Nov 2, 2012 5:28:49 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment transaction already voided',200101,'D','43caa6c4-8db6-4606-8b77-e11aa7eabc8a','PaymentTransactionAlreadyVoided','Y',TO_DATE('2012-11-02 17:28:46','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:28:46','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:28:50 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200101 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:29:21 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Payment transaction already delayed capture',200102,'D','b1bb0315-ef50-4e89-85ff-a2f621ba5f79','PaymentTransactionAlreadyDelayedCapture','Y',TO_DATE('2012-11-02 17:29:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:29:20','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:29:21 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200102 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:29:26 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Message SET MsgType='E',Updated=TO_DATE('2012-11-02 17:29:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200102
;
-- Nov 2, 2012 5:32:35 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment already voided',200103,'D','4efe0c4f-01c3-42bd-a31d-6308d707ba5c','PaymentAlreadyVoided','Y',TO_DATE('2012-11-02 17:32:34','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:32:34','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:32:35 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200103 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:32:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment already delayed capture',200104,'D','829af1a2-0405-4110-857a-0562e70aff65','PaymentAlreadyDelayedCapture','Y',TO_DATE('2012-11-02 17:32:57','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:32:57','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:32:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200104 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:33:46 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment already processed',200105,'D','43f80a23-6132-4c19-94bf-a68b6d83f2cb','PaymentAlreadyProcessed','Y',TO_DATE('2012-11-02 17:33:46','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:33:46','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:33:46 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200105 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:34:27 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment transaction already processed',200106,'D','a801e1b6-22c7-47e1-bf5b-6a1581020a26','PaymentTransactionAlreadyProcessed','Y',TO_DATE('2012-11-02 17:34:26','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:34:26','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:34:27 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200106 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:38:52 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','No payment processor model',200107,'D','b4ed0747-80a0-45c1-b649-86543edc51cb','PaymentNoProcessorModel','Y',TO_DATE('2012-11-02 17:38:51','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:38:51','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:38:52 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200107 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:42:47 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to delay capture authorization payment',200108,'D','257c739d-b91e-4699-9be9-57f2bea8b6bc','DelayCaptureAuthFailed','Y',TO_DATE('2012-11-02 17:42:46','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:42:46','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:42:47 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200108 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:43:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create a new sales payment',200109,'D','869ad1e8-db99-4b8b-b2f8-99fd3aba2005','CreateNewSalesPaymentFailed','Y',TO_DATE('2012-11-02 17:43:57','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:43:57','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:43:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200109 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:44:40 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to void authorization payment',200110,'D','105415b3-d640-4c6f-9aad-41234162e640','VoidAuthorizationPaymentFailed','Y',TO_DATE('2012-11-02 17:44:39','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2012-11-02 17:44:39','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:44:40 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200110 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
SELECT register_migration_script('201211021818_IDEMPIERE-462.sql') FROM dual
;

View File

@ -0,0 +1,167 @@
-- Nov 2, 2012 12:05:55 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=1,Updated=TO_TIMESTAMP('2012-11-02 12:05:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3112
;
-- Nov 2, 2012 12:06:35 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=1,Updated=TO_TIMESTAMP('2012-11-02 12:06:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3353
;
-- Nov 2, 2012 12:07:50 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=1,Updated=TO_TIMESTAMP('2012-11-02 12:07:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3466
;
-- Nov 2, 2012 12:10:27 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET IsCentrallyMaintained='N', Name='Void It',Updated=TO_TIMESTAMP('2012-11-02 12:10:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200723
;
-- Nov 2, 2012 12:10:27 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field_Trl SET IsTranslated='N' WHERE AD_Field_ID=200723
;
-- Nov 2, 2012 12:10:56 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET DisplayLogic='@TenderType@=C & @IsOnline@=Y & @IsVoided@=N & @TrxType@=A & @IsDelayedCapture@=N',Updated=TO_TIMESTAMP('2012-11-02 12:10:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200723
;
-- Nov 2, 2012 12:20:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=2,Updated=TO_TIMESTAMP('2012-11-02 12:20:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4363
;
-- Nov 2, 2012 12:21:07 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=2,Updated=TO_TIMESTAMP('2012-11-02 12:21:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4039
;
-- Nov 2, 2012 12:21:09 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Field SET XPosition=2,Updated=TO_TIMESTAMP('2012-11-02 12:21:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200631
;
-- Nov 2, 2012 4:17:53 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Column SET FieldLength=100,Updated=TO_TIMESTAMP('2012-11-02 16:17:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5058
;
-- Nov 2, 2012 4:17:59 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO t_alter_column values('c_paymentprocessor','UserID','VARCHAR(100)',null,null)
;
-- Nov 2, 2012 4:18:04 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO t_alter_column values('c_paymentprocessor','UserID',null,'NOT NULL',null)
;
-- Nov 2, 2012 5:28:49 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment transaction already voided',200101,'D','43caa6c4-8db6-4606-8b77-e11aa7eabc8a','PaymentTransactionAlreadyVoided','Y',TO_TIMESTAMP('2012-11-02 17:28:46','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:28:46','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:28:50 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200101 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:29:21 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Payment transaction already delayed capture',200102,'D','b1bb0315-ef50-4e89-85ff-a2f621ba5f79','PaymentTransactionAlreadyDelayedCapture','Y',TO_TIMESTAMP('2012-11-02 17:29:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:29:20','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:29:21 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200102 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:29:26 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
UPDATE AD_Message SET MsgType='E',Updated=TO_TIMESTAMP('2012-11-02 17:29:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200102
;
-- Nov 2, 2012 5:32:35 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment already voided',200103,'D','4efe0c4f-01c3-42bd-a31d-6308d707ba5c','PaymentAlreadyVoided','Y',TO_TIMESTAMP('2012-11-02 17:32:34','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:32:34','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:32:35 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200103 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:32:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment already delayed capture',200104,'D','829af1a2-0405-4110-857a-0562e70aff65','PaymentAlreadyDelayedCapture','Y',TO_TIMESTAMP('2012-11-02 17:32:57','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:32:57','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:32:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200104 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:33:46 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment already processed',200105,'D','43f80a23-6132-4c19-94bf-a68b6d83f2cb','PaymentAlreadyProcessed','Y',TO_TIMESTAMP('2012-11-02 17:33:46','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:33:46','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:33:46 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200105 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:34:27 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Payment transaction already processed',200106,'D','a801e1b6-22c7-47e1-bf5b-6a1581020a26','PaymentTransactionAlreadyProcessed','Y',TO_TIMESTAMP('2012-11-02 17:34:26','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:34:26','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:34:27 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200106 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:38:52 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','No payment processor model',200107,'D','b4ed0747-80a0-45c1-b649-86543edc51cb','PaymentNoProcessorModel','Y',TO_TIMESTAMP('2012-11-02 17:38:51','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:38:51','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:38:52 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200107 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:42:47 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to delay capture authorization payment',200108,'D','257c739d-b91e-4699-9be9-57f2bea8b6bc','DelayCaptureAuthFailed','Y',TO_TIMESTAMP('2012-11-02 17:42:46','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:42:46','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:42:47 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200108 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:43:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to create a new sales payment',200109,'D','869ad1e8-db99-4b8b-b2f8-99fd3aba2005','CreateNewSalesPaymentFailed','Y',TO_TIMESTAMP('2012-11-02 17:43:57','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:43:57','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:43:58 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200109 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Nov 2, 2012 5:44:40 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Failed to void authorization payment',200110,'D','105415b3-d640-4c6f-9aad-41234162e640','VoidAuthorizationPaymentFailed','Y',TO_TIMESTAMP('2012-11-02 17:44:39','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-11-02 17:44:39','YYYY-MM-DD HH24:MI:SS'))
;
-- Nov 2, 2012 5:44:40 PM SGT
-- IDEMPIERE-462 Ticket #1001503: Credit Cards Online
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200110 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
SELECT register_migration_script('201211021818_IDEMPIERE-462.sql') FROM dual
;

View File

@ -33,7 +33,7 @@ public class VoidOnlineAuthorizationPaymentTransaction extends SvrProcess {
if (pt.isVoided())
throw new AdempiereException(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyVoided"));
if (pt.isDelayedCapture())
throw new AdempiereException(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyDelayCaptured"));
throw new AdempiereException(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyDelayedCapture"));
// Process it
boolean ok = pt.voidOnlineAuthorizationPaymentTransaction();

View File

@ -39,7 +39,7 @@ public class PaymentUtil {
public static MBPBankAccount[] getBankAccounts(MBPartner bpartner,
String creditCardNo) {
ArrayList<MBPBankAccount> list = new ArrayList<MBPBankAccount>();
String sql = "SELECT * FROM C_BP_BankAccount WHERE C_BPartner_ID=? AND CREDITCARDNUMBER=?";
String sql = "SELECT * FROM C_BP_BankAccount WHERE C_BPartner_ID=? AND CREDITCARDNUMBER=? AND IsActive='Y' order by created";
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
@ -74,7 +74,7 @@ public class PaymentUtil {
StringBuffer encryptedCC = new StringBuffer();
for (int i = 0; i < (valueLength - 4); i++) {
encryptedCC.append("*");
encryptedCC.append("0");
}
encryptedCC.append(value.substring(valueLength - 4, valueLength));

View File

@ -1959,13 +1959,6 @@ public class MInvoice extends X_C_Invoice implements DocAction
}
} // project
// auto allocate sales payment
if (isSOTrx() && !isReversal())
{
}
// auto delay capture authorization payment
if (isSOTrx() && !isReversal())
{
@ -2000,7 +1993,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
pt.saveEx();
if (!ok)
{
m_processMsg = "Failed to void authorization payment: " + pt.getErrorMessage();
m_processMsg = Msg.getMsg(getCtx(), "VoidAuthorizationPaymentFailed") + ": " + pt.getErrorMessage();
return DocAction.STATUS_Invalid;
}
}
@ -2010,7 +2003,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
newSalesPT.saveEx();
if (!ok)
{
m_processMsg = "Failed to create a new sales payment: " + newSalesPT.getErrorMessage();
m_processMsg = Msg.getMsg(getCtx(), "CreateNewSalesPaymentFailed") + ": " + newSalesPT.getErrorMessage();
return DocAction.STATUS_Invalid;
}
}
@ -2023,7 +2016,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
pt.saveEx();
if (!ok)
{
m_processMsg = "Failed to delay capture authorization payment: " + pt.getErrorMessage();
m_processMsg = Msg.getMsg(getCtx(), "DelayCaptureAuthFailed") + ": " + pt.getErrorMessage();
return DocAction.STATUS_Invalid;
}
}

View File

@ -1,10 +1,34 @@
/******************************************************************************
* Copyright (C) 2012 Elaine Tan *
* Copyright (C) 2012 Trek Global
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
/**
*
* @author Elaine
*
*/
public class MOnlineTrxHistory extends X_X_OnlineTrxHistory {
/**
*
*/
private static final long serialVersionUID = 2160888813932490117L;
public MOnlineTrxHistory(Properties ctx, int X_OnlineTrxHistory_ID, String trxName)
{
super(ctx, X_OnlineTrxHistory_ID, trxName);

View File

@ -464,7 +464,7 @@ public final class MPayment extends X_C_Payment
if (isVoided())
{
log.info("Already voided - " + getR_Result() + " - " + getR_RespMsg());
setErrorMessage("Payment already voided");
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentAlreadyVoided"));
return true;
}
}
@ -472,8 +472,8 @@ public final class MPayment extends X_C_Payment
{
if (isDelayedCapture())
{
log.info("Already delay captured - " + getR_Result() + " - " + getR_RespMsg());
setErrorMessage("Payment already delay captured");
log.info("Already delayed capture - " + getR_Result() + " - " + getR_RespMsg());
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentAlreadyDelayedCapture"));
return true;
}
}
@ -482,7 +482,7 @@ public final class MPayment extends X_C_Payment
if (isApproved())
{
log.info("Already processed - " + getR_Result() + " - " + getR_RespMsg());
setErrorMessage("Payment already processed");
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentAlreadyProcessed"));
return true;
}
}
@ -492,7 +492,7 @@ public final class MPayment extends X_C_Payment
if (m_mBankAccountProcessor == null)
{
log.log(Level.WARNING, "No Payment Processor Model");
setErrorMessage("No Payment Processor Model");
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNoProcessorModel"));
return false;
}
@ -503,7 +503,7 @@ public final class MPayment extends X_C_Payment
MPaymentProcessor paymentProcessor = new MPaymentProcessor(m_mBankAccountProcessor.getCtx(), m_mBankAccountProcessor.getC_PaymentProcessor_ID(), m_mBankAccountProcessor.get_TrxName());
PaymentProcessor pp = PaymentProcessor.create(paymentProcessor, this);
if (pp == null)
setErrorMessage("No Payment Processor");
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNoProcessor"));
else
{
// Validate before trying to process
@ -529,7 +529,7 @@ public final class MPayment extends X_C_Payment
catch (Exception e)
{
log.log(Level.SEVERE, "processOnline", e);
setErrorMessage("Payment Processor Error: " + e.getMessage());
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNotProcessed") + ": " + e.getMessage());
}
if (approved)
@ -2803,7 +2803,7 @@ public final class MPayment extends X_C_Payment
if(!processOnline())
{
log.log(Level.SEVERE, "Failed to cancel payment online");
m_processMsg = "Failed to cancel payment online";
m_processMsg = Msg.getMsg(getCtx(), "PaymentNotCancelled");
return false;
}
}

View File

@ -1,3 +1,17 @@
/******************************************************************************
* Copyright (C) 2012 Elaine Tan *
* Copyright (C) 2012 Trek Global
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
@ -14,8 +28,18 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Trx;
/**
*
* @author Elaine
*
*/
public class MPaymentTransaction extends X_C_PaymentTransaction implements ProcessCall, PaymentInterface {
/**
*
*/
private static final long serialVersionUID = 3136835982476528825L;
public MPaymentTransaction(Properties ctx, int C_PaymentTransaction_ID, String trxName) {
super(ctx, C_PaymentTransaction_ID, trxName);
@ -147,7 +171,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
if (isVoided())
{
log.info("Already voided - " + getR_Result() + " - " + getR_RespMsg());
setErrorMessage("Payment already voided");
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyVoided"));
return true;
}
}
@ -155,8 +179,8 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
{
if (isDelayedCapture())
{
log.info("Already delay captured - " + getR_Result() + " - " + getR_RespMsg());
setErrorMessage("Payment already delay captured");
log.info("Already delayed capture - " + getR_Result() + " - " + getR_RespMsg());
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyDelayedCapture"));
return true;
}
}
@ -165,7 +189,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
if (isApproved())
{
log.info("Already processed - " + getR_Result() + " - " + getR_RespMsg());
setErrorMessage("Payment already processed");
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyProcessed"));
return true;
}
}
@ -175,7 +199,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
if (m_mBankAccountProcessor == null)
{
log.log(Level.WARNING, "No Payment Processor Model");
setErrorMessage("No Payment Processor Model");
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNoProcessorModel"));
return false;
}
@ -187,7 +211,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
MPaymentProcessor paymentProcessor = new MPaymentProcessor(m_mBankAccountProcessor.getCtx(), m_mBankAccountProcessor.getC_PaymentProcessor_ID(), m_mBankAccountProcessor.get_TrxName());
PaymentProcessor pp = PaymentProcessor.create(paymentProcessor, this);
if (pp == null)
setErrorMessage("No Payment Processor");
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNoProcessor"));
else
{
// Validate before trying to process
@ -232,7 +256,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
catch (Exception e)
{
log.log(Level.SEVERE, "processOnline", e);
setErrorMessage("Payment Processor Error: " + e.getMessage());
setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentNotProcessed") + ": " + e.getMessage());
}
setIsApproved(approved);

View File

@ -1,8 +1,27 @@
/******************************************************************************
* Copyright (C) 2012 Elaine Tan *
* Copyright (C) 2012 Trek Global
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
/**
*
* @author Elaine
*
*/
public interface PaymentInterface {
/** Set Account City.

View File

@ -117,6 +117,8 @@ public abstract class PaymentProcessor
*/
public String validate() throws IllegalArgumentException {
String msg = null;
if (p_mp.getCustomerPaymentProfileID() != null)
return msg;
if (MPayment.TENDERTYPE_CreditCard.equals(p_mp.getTenderType())) {
msg = validateCreditCard();
} else if (MPayment.TENDERTYPE_Check.equals(p_mp.getTenderType())) {

View File

@ -23,10 +23,12 @@ import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.math.BigDecimal;
import org.adempiere.util.PaymentUtil;
import org.compiere.apps.ADialog;
import org.compiere.grid.ed.VNumber;
import org.compiere.model.GridTab;
import org.compiere.model.MBankAccountProcessor;
import org.compiere.model.MInvoice;
import org.compiere.model.MPaymentProcessor;
import org.compiere.swing.CButton;
import org.compiere.swing.CComboBox;
@ -130,13 +132,31 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act
kAmountField.setValue(m_mPayment.getPayAmt());
// if approved/paid, don't let it change
kTypeCombo.setReadWrite(!m_mPayment.isApproved());
kNumberField.setReadWrite(!m_mPayment.isApproved());
kNameField.setReadWrite(!m_mPayment.isApproved());
kExpField.setReadWrite(!m_mPayment.isApproved());
kApprovalField.setReadWrite(!m_mPayment.isApproved());
kOnline.setReadWrite(!m_mPayment.isApproved());
kAmountField.setReadWrite(!m_mPayment.isApproved());
kTypeCombo.setReadWrite(!(m_mPayment.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kNumberField.setReadWrite(!(m_mPayment.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kNameField.setReadWrite(!(m_mPayment.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kExpField.setReadWrite(!(m_mPayment.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kApprovalField.setReadWrite(!(m_mPayment.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kOnline.setReadWrite(!(m_mPayment.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kAmountField.setReadWrite(!(m_mPayment.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
}
else if (m_mPaymentTransaction != null)
{
kNumberField.setText(m_mPaymentTransaction.getCreditCardNumber());
kNameField.setText(m_mPaymentTransaction.getA_Name());
kExpField.setText(PaymentUtil.getCreditCardExp(m_mPaymentTransaction.getCreditCardExpMM(), m_mPaymentTransaction.getCreditCardExpYY(), null));
kApprovalField.setText(m_mPaymentTransaction.getVoiceAuthCode());
kStatus.setText(m_mPaymentTransaction.getR_PnRef());
kAmountField.setValue(m_mPaymentTransaction.getPayAmt());
// if approved/paid, don't let it change
kTypeCombo.setReadWrite(!(m_mPaymentTransaction.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kNumberField.setReadWrite(!(m_mPaymentTransaction.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kNameField.setReadWrite(!(m_mPaymentTransaction.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kExpField.setReadWrite(!(m_mPaymentTransaction.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kApprovalField.setReadWrite(!(m_mPaymentTransaction.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kOnline.setReadWrite(!(m_mPaymentTransaction.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
kAmountField.setReadWrite(!(m_mPaymentTransaction.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed)));
}
/**
@ -152,14 +172,22 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act
if (selectedCreditCard != null)
kTypeCombo.setSelectedItem(selectedCreditCard);
if (m_mPayment.isApproved())
if (m_mPayment.isApproved() && m_DocStatus.equals(MInvoice.DOCSTATUS_Completed))
{
kOnline.setVisible(true);
kOnline.setVisible(m_mPayment.isOnline());
kOnline.setEnabled(false);
MBankAccountProcessor bankAccountProcessor = new MBankAccountProcessor(m_mPayment.getCtx(), m_mPayment.getC_BankAccount_ID(), m_mPayment.getC_PaymentProcessor_ID(), null);
setBankAccountProcessor(bankAccountProcessor);
}
else if (m_mPaymentTransaction != null)
{
kOnline.setVisible(m_mPaymentTransaction.isOnline());
kOnline.setEnabled(false);
MBankAccountProcessor bankAccountProcessor = new MBankAccountProcessor(m_mPaymentTransaction.getCtx(), m_mPaymentTransaction.getC_BankAccount_ID(), m_mPaymentTransaction.getC_PaymentProcessor_ID(), null);
setBankAccountProcessor(bankAccountProcessor);
}
else
{
boolean exist = isBankAccountProcessorExist("", (BigDecimal) kAmountField.getValue());