Discussion:
[Citrusdb-users] I got error during conduct refund.
Eric Cho
2010-04-24 20:16:35 UTC
Permalink
Hello.

I did some of test for CitrusDB.

I'm using that based on prepaycc (pre-pay Credit card), everything was fine but refund.

When I tried to refund in the Billing's refund menu (http://localhost/citrus-2.1/index.php?load=refund&type=tools&billingid=45&submit=Submit),

That records didn't exported when I tried export for one text file in the http://localhost/citrus-2.1/index.php?load=refundcc&type=tools .

(There's result file for that but content was empty.)



So, I analyzed related source, I found something miss.

1. refunded = 'y' shouldn't do there, because refund export page works as loading refunded<>'y'

tools/refund.php line 51~61 has been changed as commentation.

2. DB scheme.

DROP TABLE IF EXISTS `payment_history`;

CREATE TABLE `payment_history` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`creation_date` DATE NOT NULL DEFAULT '0000-00-00',
`transaction_code` VARCHAR(32) DEFAULT NULL,
`billing_id` INT(11) NOT NULL DEFAULT '0',
`creditcard_number` VARCHAR(16) DEFAULT NULL,
`creditcard_expire` INT(4) UNSIGNED ZEROFILL DEFAULT NULL,
`billing_amount` DECIMAL(9,2) DEFAULT NULL,
`response_code` VARCHAR(100) DEFAULT NULL,
`paid_from` DATE NOT NULL DEFAULT '0000-00-00',
`paid_to` DATE NOT NULL DEFAULT '0000-00-00',
`invoice_number` INT(128) DEFAULT NULL,
`status` SET('authorized','declined','pending','donotreactivate','collections','turnedoff','credit','canceled','cancelwfee','pastdue','noticesent','waiting') DEFAULT NULL,
`payment_type` SET('creditcard','prepaycc','check','cash','eft','nsf','discount') DEFAULT NULL,
`check_number` VARCHAR(32) DEFAULT NULL,
`avs_response` VARCHAR(32) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `billing_id_index` (`billing_id`)
) ENGINE=MYISAM AUTO_INCREMENT=142 DEFAULT CHARSET=latin1;

(To sum up, there's only change of adding one enum for payment_type column as 'prepaycc' next to 'creditcard')



3. Not solved yet, I passed this step by wrote response as 'No' in the import file.

tools/importcc.php line 79~

if ($response_id == 'N') { if ($transaction_code == 'CREDIT' OR $transaction_code == '38') {

It's weird.. CREDIT (Refund) is suppose to be 'N' as response ??

I wonder whether that is your intention or not.



My object of this mail is confirm that is whether good approach, and if so, willing to help for you.

Please let me know if there's something wrong

Have a good weekend! :)

Regards.
Paul Yasi
2010-04-26 00:02:33 UTC
Permalink
Item 1: Refunds do not currently work for prepaycc billing types,
only normal monthly creditcard bills. When you went into the refund
report to indicate the amount of the refund it would have came back
with a message: "You must manually process a refund for this billing
method" Prepaycc had sort of been deprecated as a billing type since
it's somewhat useless, except that is prevents the customer from being
charged again in X months automatically if their previous billing
failed.

Item 2: the way it handle's importing prepaycc billing types is a bug,
however the right fix for this is to change the importcc code that
inserts into payment_history to always indicate a creditcard payment
type instead of looking to whatever billing method is being used,
since the import credit card tool will always be importing credit card
payments. A prepaycc billing type is still paid with a creditcard
payment type. Billing type and Payment Type are two different things.

I just commited this change shown here:
http://bazaar.launchpad.net/~paul-citrusdb/citrusdb/gpg/revision/240

Item 3: My own card software gives me an "N" and some other software I
had gave a "38" as a code, so I just have that in there for myself.

Paul
Post by Eric Cho
Hello.
I did some of test for CitrusDB.
I'm using that based on prepaycc (pre-pay Credit card), everything was fine but refund.
When I tried to refund in the Billing's refund menu
(http://localhost/citrus-2.1/index.php?load=refund&type=tools&billingid=45&submit=Submit),
That records didn't exported when I tried export for one text file in the
http://localhost/citrus-2.1/index.php?load=refundcc&type=tools .
(There's result file for that but content was empty.)
So, I analyzed related source, I found something miss.
1. refunded = 'y' shouldn't do there, because refund export page works as
loading refunded<>'y'
tools/refund.php line 51~61 has been changed as commentation.
2. DB scheme.
DROP TABLE IF EXISTS `payment_history`;
CREATE TABLE `payment_history` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `creation_date` DATE NOT NULL DEFAULT '0000-00-00',
  `transaction_code` VARCHAR(32) DEFAULT NULL,
  `billing_id` INT(11) NOT NULL DEFAULT '0',
  `creditcard_number` VARCHAR(16) DEFAULT NULL,
  `creditcard_expire` INT(4) UNSIGNED ZEROFILL DEFAULT NULL,
  `billing_amount` DECIMAL(9,2) DEFAULT NULL,
  `response_code` VARCHAR(100) DEFAULT NULL,
  `paid_from` DATE NOT NULL DEFAULT '0000-00-00',
  `paid_to` DATE NOT NULL DEFAULT '0000-00-00',
  `invoice_number` INT(128) DEFAULT NULL,
  `status`
SET('authorized','declined','pending','donotreactivate','collections','turnedoff','credit','canceled','cancelwfee','pastdue','noticesent','waiting')
DEFAULT NULL,
  `payment_type`
SET('creditcard','prepaycc','check','cash','eft','nsf','discount') DEFAULT
NULL,
  `check_number` VARCHAR(32) DEFAULT NULL,
  `avs_response` VARCHAR(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `billing_id_index` (`billing_id`)
) ENGINE=MYISAM AUTO_INCREMENT=142 DEFAULT CHARSET=latin1;
(To sum up, there's only change of adding one enum for payment_type column
as 'prepaycc' next to 'creditcard')
3. Not solved yet, I passed this step by wrote response as 'No' in the import file.
tools/importcc.php line 79~
    if ($response_id == 'N') {     if ($transaction_code == 'CREDIT' OR
$transaction_code == '38') {
It's weird.. CREDIT (Refund) is suppose to be 'N' as response ??
I wonder whether that is your intention or not.
My object of this mail is confirm that is whether good approach, and if so,
willing to help for you.
Please let me know if there's something wrong
Have a good weekend! :)
Regards.
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
Eric Cho
2010-04-26 08:51:41 UTC
Permalink
Thanks for your reply.

#1,

As I tried 'creditcard' instead of 'prepaycc', it works well same as 'prepaycc'. (almostly 100% for me)

What's exactly differences 'creditcard' and 'prepaycc'??

I could use both, since I can control billing date (upcoming).


#2,

When I tried refund I couldn't find a message such "You must manually process ... that you said.

Anyway, I added exception code for cancel refunding before executing refund button in tools menu.

(Since I will use it in a batch process on a regular basis.)

I hope it helps you even less :)


Thanks in everytime.

Regards.

-Eric






________________________________
From: Paul Yasi <***@coffeebuzz.com>
To: For users of CitrusDB discussion <citrusdb-***@lists.sourceforge.net>
Sent: Mon, April 26, 2010 9:02:33 AM
Subject: Re: [Citrusdb-users] I got error during conduct refund.

Item 1: Refunds do not currently work for prepaycc billing types,
only normal monthly creditcard bills. When you went into the refund
report to indicate the amount of the refund it would have came back
with a message: "You must manually process a refund for this billing
method" Prepaycc had sort of been deprecated as a billing type since
it's somewhat useless, except that is prevents the customer from being
charged again in X months automatically if their previous billing
failed.

Item 2: the way it handle's importing prepaycc billing types is a bug,
however the right fix for this is to change the importcc code that
inserts into payment_history to always indicate a creditcard payment
type instead of looking to whatever billing method is being used,
since the import credit card tool will always be importing credit card
payments. A prepaycc billing type is still paid with a creditcard
payment type. Billing type and Payment Type are two different things.

I just commited this change shown here:
http://bazaar.launchpad.net/~paul-citrusdb/citrusdb/gpg/revision/240

Item 3: My own card software gives me an "N" and some other software I
had gave a "38" as a code, so I just have that in there for myself.

Paul
Post by Eric Cho
Hello.
I did some of test for CitrusDB.
I'm using that based on prepaycc (pre-pay Credit card), everything was fine but refund.
When I tried to refund in the Billing's refund menu
(http://localhost/citrus-2.1/index.php?load=refund&type=tools&billingid=45&submit=Submit),
That records didn't exported when I tried export for one text file in the
http://localhost/citrus-2.1/index.php?load=refundcc&type=tools .
(There's result file for that but content was empty.)
So, I analyzed related source, I found something miss.
1. refunded = 'y' shouldn't do there, because refund export page works as
loading refunded<>'y'
tools/refund.php line 51~61 has been changed as commentation.
2. DB scheme.
DROP TABLE IF EXISTS `payment_history`;
CREATE TABLE `payment_history` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`creation_date` DATE NOT NULL DEFAULT '0000-00-00',
`transaction_code` VARCHAR(32) DEFAULT NULL,
`billing_id` INT(11) NOT NULL DEFAULT '0',
`creditcard_number` VARCHAR(16) DEFAULT NULL,
`creditcard_expire` INT(4) UNSIGNED ZEROFILL DEFAULT NULL,
`billing_amount` DECIMAL(9,2) DEFAULT NULL,
`response_code` VARCHAR(100) DEFAULT NULL,
`paid_from` DATE NOT NULL DEFAULT '0000-00-00',
`paid_to` DATE NOT NULL DEFAULT '0000-00-00',
`invoice_number` INT(128) DEFAULT NULL,
`status`
SET('authorized','declined','pending','donotreactivate','collections','turnedoff','credit','canceled','cancelwfee','pastdue','noticesent','waiting')
DEFAULT NULL,
`payment_type`
SET('creditcard','prepaycc','check','cash','eft','nsf','discount') DEFAULT
NULL,
`check_number` VARCHAR(32) DEFAULT NULL,
`avs_response` VARCHAR(32) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `billing_id_index` (`billing_id`)
) ENGINE=MYISAM AUTO_INCREMENT=142 DEFAULT CHARSET=latin1;
(To sum up, there's only change of adding one enum for payment_type column
as 'prepaycc' next to 'creditcard')
3. Not solved yet, I passed this step by wrote response as 'No' in the import file.
tools/importcc.php line 79~
if ($response_id == 'N') { if ($transaction_code == 'CREDIT' OR
$transaction_code == '38') {
It's weird.. CREDIT (Refund) is suppose to be 'N' as response ??
I wonder whether that is your intention or not.
My object of this mail is confirm that is whether good approach, and if so,
willing to help for you.
Please let me know if there's something wrong
Have a good weekend! :)
Regards.
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System

------------------------------------------------------------------------------
Eric Cho
2010-04-26 17:31:45 UTC
Permalink
Hello!

I found one little error in the "tools/modules/billling/importccupdate.php"

85 line
I believe that
$armordate .= "$line[0]\n";
will be change to
$armordata .= "$line[0]\n";

'e' >> 'a'

I hope this information will be reflect to next version :)

Have a good day!

-Eric
Paul Yasi
2010-04-26 23:36:34 UTC
Permalink
Oops. I've committed a fix for the next release:
http://bazaar.launchpad.net/~paul-citrusdb/citrusdb/gpg/revision/241

Paul
Post by Eric Cho
Hello!
I found one little error in the "tools/modules/billling/importccupdate.php"
85 line
I believe that
          $armordate .= "$line[0]\n";
will be change to
          $armordata .= "$line[0]\n";
'e' >> 'a'
I hope this information will be reflect to next version :)
Have a good day!
-Eric
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
Eric Cho
2010-04-26 08:54:59 UTC
Permalink
Oh sorry.

I forgot to attach my code in tools/refund.php

As at #2, I made this codes at line 46~

if ($refundamount == 0) {
$query = "UPDATE billing_details SET
refund_amount = 0.00,
refund_date = null
WHERE id = $detailid";
$result = $DB->Execute($query) or die ("$query Query Failed");

} else {

$query = "UPDATE billing_details SET
refund_amount = '$refundamount',
refund_date = CURRENT_DATE
WHERE id = $detailid";
$result = $DB->Execute($query) or die ("$query Query Failed");
}

So I could cancel refunding by put price as 0.. before actually refund when I click refund button in tools menu.

Please take a look this.

Thanks.

-Eric







________________________________
From: Eric Cho <***@yahoo.com>
To: For users of CitrusDB discussion <citrusdb-***@lists.sourceforge.net>
Sent: Mon, April 26, 2010 5:51:41 PM
Subject: Re: [Citrusdb-users] I got error during conduct refund.


Thanks for your reply.

#1,

As I tried 'creditcard' instead of 'prepaycc', it works well same as 'prepaycc'. (almostly 100% for me)

What's exactly differences 'creditcard' and 'prepaycc'??

I could use both, since I can control billing date (upcoming).


#2,

When I tried refund I couldn't find a message such "You must manually process ... that you said.

Anyway, I added exception code for cancel refunding before executing refund button in tools menu.

(Since I will use it in a batch process on a regular basis.)

I hope it helps you even less :)


Thanks in everytime.

Regards.

-Eric






________________________________
From: Paul Yasi <***@coffeebuzz.com>
To: For users of CitrusDB discussion <citrusdb-***@lists.sourceforge.net>
Sent: Mon, April 26, 2010 9:02:33 AM
Subject: Re: [Citrusdb-users] I got error during conduct refund.

Item 1: Refunds do not currently work for prepaycc billing types,
only normal monthly creditcard bills. When you went into the refund
report to indicate the amount of the refund it would have came back
with a message: "You must manually process a refund for this billing
method" Prepaycc had sort of been deprecated as a billing type since
it's somewhat useless, except that is prevents the customer from being
charged again in X months automatically if their previous billing
failed.

Item 2: the way it handle's importing prepaycc billing types is a bug,
however the right fix for this is to change the importcc code that
inserts into payment_history to always indicate a creditcard payment
type instead of looking to whatever billing method is being used,
since the import credit card tool will always be importing credit card
payments. A prepaycc billing type is still paid with a creditcard
payment type. Billing type and Payment Type are two different things.

I just commited this change shown here:
http://bazaar.launchpad.net/%7Epaul-citrusdb/citrusdb/gpg/revision/240

Item 3: My own card software gives me an "N" and some other software I
had gave a "38" as a code, so I just have that in there for myself.

Paul
Post by Eric Cho
Hello.
I did some of test for CitrusDB.
I'm using that based on prepaycc (pre-pay Credit card), everything was fine
but refund.
When I tried to refund in the Billing's refund menu
(http://localhost/citrus-2.1/index.php?load=refund&type=tools&billingid=45&submit=Submit),
That records didn't exported when I tried export for one text file in the
http://localhost/citrus-2.1/index.php?load=refundcc&type=tools .
(There's result file for that but content was empty.)
So, I analyzed related source, I found something miss.
1. refunded = 'y' shouldn't do there, because refund export page works as
loading refunded<>'y'
tools/refund.php line 51~61 has been changed as commentation.
2. DB scheme.
DROP TABLE IF EXISTS `payment_history`;
CREATE TABLE `payment_history` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`creation_date` DATE NOT NULL DEFAULT '0000-00-00',
`transaction_code` VARCHAR(32) DEFAULT NULL,
`billing_id` INT(11) NOT NULL DEFAULT '0',
`creditcard_number` VARCHAR(16) DEFAULT NULL,
`creditcard_expire` INT(4) UNSIGNED ZEROFILL DEFAULT NULL,
`billing_amount` DECIMAL(9,2) DEFAULT NULL,
`response_code` VARCHAR(100) DEFAULT NULL,
`paid_from` DATE NOT NULL DEFAULT '0000-00-00',
`paid_to` DATE NOT NULL DEFAULT '0000-00-00',
`invoice_number` INT(128) DEFAULT NULL,
`status`
SET('authorized','declined','pending','donotreactivate','collections','turnedoff','credit','canceled','cancelwfee','pastdue','noticesent','waiting')
DEFAULT NULL,
`payment_type`
SET('creditcard','prepaycc','check','cash','eft','nsf','discount') DEFAULT
NULL,
`check_number` VARCHAR(32) DEFAULT NULL,
`avs_response` VARCHAR(32) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `billing_id_index` (`billing_id`)
) ENGINE=MYISAM AUTO_INCREMENT=142 DEFAULT CHARSET=latin1;
(To sum up, there's only change of adding one enum for payment_type column
as 'prepaycc' next to 'creditcard')
3. Not solved yet, I passed this step by wrote response as 'No' in the
import file.
tools/importcc.php line 79~
if ($response_id == 'N') { if ($transaction_code == 'CREDIT' OR
$transaction_code == '38') {
It's weird.. CREDIT (Refund) is suppose to be 'N' as response ??
I wonder whether that is your intention or not.
My object of this mail is confirm that is whether good approach, and if so,
willing to help for you.
Please let me know if there's something wrong
Have a good weekend! :)
Regards.
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System

------------------------------------------------------------------------------
Paul Yasi
2010-04-26 23:58:38 UTC
Permalink
I've added this code in there now. I also added your name to the code
contributor list. Do you have a domain name you would like listed
next to your name?

http://bazaar.launchpad.net/~paul-citrusdb/citrusdb/gpg/revision/242

Thanks,

Paul
Post by Eric Cho
Oh sorry.
I forgot to attach my code in tools/refund.php
As at #2, I made this codes at line 46~
    if ($refundamount == 0) {
        $query = "UPDATE billing_details SET
        refund_amount = 0.00,
        refund_date = null
        WHERE id = $detailid";
        $result = $DB->Execute($query) or die ("$query Query Failed");
    } else {
        $query = "UPDATE billing_details SET
        refund_amount = '$refundamount',
        refund_date = CURRENT_DATE
        WHERE id = $detailid";
        $result = $DB->Execute($query) or die ("$query Query Failed");
    }
So I could cancel refunding by put price as 0.. before actually refund when
I click refund button in tools menu.
Please take a look this.
Thanks.
-Eric
________________________________
Sent: Mon, April 26, 2010 5:51:41 PM
Subject: Re: [Citrusdb-users] I got error during conduct refund.
Thanks for your reply.
#1,
As I tried 'creditcard' instead of 'prepaycc', it works well same as
'prepaycc'. (almostly 100% for me)
What's exactly differences 'creditcard' and 'prepaycc'??
I could use both, since I can control billing date (upcoming).
#2,
When I tried refund I couldn't find a message such "You must manually
process ...   that you said.
Anyway, I added exception code for cancel refunding before executing refund
button in tools menu.
(Since I will use it in a batch process on a regular basis.)
I hope it helps you even less :)
Thanks in everytime.
Regards.
-Eric
________________________________
Sent: Mon, April 26, 2010 9:02:33 AM
Subject: Re: [Citrusdb-users] I got error during conduct refund.
Item 1:  Refunds do not currently work for prepaycc billing types,
only normal monthly creditcard bills.  When you went into the refund
report to indicate the amount of the refund it would have came back
with a message: "You must manually process a refund for this billing
method"  Prepaycc had sort of been deprecated as a billing type since
it's somewhat useless, except that is prevents the customer from being
charged again in X months automatically if their previous billing
failed.
Item 2: the way it handle's importing prepaycc billing types is a bug,
however the right fix for this is to change the importcc code that
inserts into payment_history to always indicate a creditcard payment
type instead of looking to whatever billing method is being used,
since the import credit card tool will always be importing credit card
payments.  A prepaycc billing type is still paid with a creditcard
payment type.  Billing type and Payment Type are two different things.
http://bazaar.launchpad.net/%7Epaul-citrusdb/citrusdb/gpg/revision/240
Item 3: My own card software gives me an "N" and some other software I
had gave a "38" as a code, so I just have that in there for myself.
Paul
Post by Eric Cho
Hello.
I did some of test for CitrusDB.
I'm using that based on prepaycc (pre-pay Credit card), everything was fine
but refund.
When I tried to refund in the Billing's refund menu
(http://localhost/citrus-2.1/index.php?load=refund&type=tools&billingid=45&submit=Submit),
That records didn't exported when I tried export for one text file in the
http://localhost/citrus-2.1/index.php?load=refundcc&type=tools .
(There's result file for that but content was empty.)
So, I analyzed related source, I found something miss.
1. refunded = 'y' shouldn't do there, because refund export page works as
loading refunded<>'y'
tools/refund.php line 51~61 has been changed as commentation.
2. DB scheme.
DROP TABLE IF EXISTS `payment_history`;
CREATE TABLE `payment_history` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `creation_date` DATE NOT NULL DEFAULT '0000-00-00',
  `transaction_code` VARCHAR(32) DEFAULT NULL,
  `billing_id` INT(11) NOT NULL DEFAULT '0',
  `creditcard_number` VARCHAR(16) DEFAULT NULL,
  `creditcard_expire` INT(4) UNSIGNED ZEROFILL DEFAULT NULL,
  `billing_amount` DECIMAL(9,2) DEFAULT NULL,
  `response_code` VARCHAR(100) DEFAULT NULL,
  `paid_from` DATE NOT NULL DEFAULT '0000-00-00',
  `paid_to` DATE NOT NULL DEFAULT '0000-00-00',
  `invoice_number` INT(128) DEFAULT NULL,
  `status`
SET('authorized','declined','pending','donotreactivate','collections','turnedoff','credit','canceled','cancelwfee','pastdue','noticesent','waiting')
DEFAULT NULL,
  `payment_type`
SET('creditcard','prepaycc','check','cash','eft','nsf','discount') DEFAULT
NULL,
  `check_number` VARCHAR(32) DEFAULT NULL,
  `avs_response` VARCHAR(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `billing_id_index` (`billing_id`)
) ENGINE=MYISAM AUTO_INCREMENT=142 DEFAULT CHARSET=latin1;
(To sum up, there's only change of adding one enum for payment_type column
as 'prepaycc' next to 'creditcard')
3. Not solved yet, I passed this step by wrote response as 'No' in the
import file.
tools/importcc.php line 79~
    if ($response_id == 'N') {     if ($transaction_code == 'CREDIT' OR
$transaction_code == '38') {
It's weird.. CREDIT (Refund) is suppose to be 'N' as response ??
I wonder whether that is your intention or not.
My object of this mail is confirm that is whether good approach, and if so,
willing to help for you.
Please let me know if there's something wrong
Have a good weekend! :)
Regards.
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
Eric Cho
2010-04-27 01:06:54 UTC
Permalink
Oh. Thanks.

This is my address for twitter. I hope you add this there.

http://twitter.com/myfoxfree

Appreciate!

-Eric





________________________________
From: Paul Yasi <***@coffeebuzz.com>
To: For users of CitrusDB discussion <citrusdb-***@lists.sourceforge.net>
Sent: Tue, April 27, 2010 8:58:38 AM
Subject: Re: [Citrusdb-users] I got error during conduct refund.

I've added this code in there now. I also added your name to the code
contributor list. Do you have a domain name you would like listed
next to your name?

http://bazaar.launchpad.net/~paul-citrusdb/citrusdb/gpg/revision/242

Thanks,

Paul
Post by Eric Cho
Oh sorry.
I forgot to attach my code in tools/refund.php
As at #2, I made this codes at line 46~
if ($refundamount == 0) {
$query = "UPDATE billing_details SET
refund_amount = 0.00,
refund_date = null
WHERE id = $detailid";
$result = $DB->Execute($query) or die ("$query Query Failed");
} else {
$query = "UPDATE billing_details SET
refund_amount = '$refundamount',
refund_date = CURRENT_DATE
WHERE id = $detailid";
$result = $DB->Execute($query) or die ("$query Query Failed");
}
So I could cancel refunding by put price as 0.. before actually refund when
I click refund button in tools menu.
Please take a look this.
Thanks.
-Eric
________________________________
Sent: Mon, April 26, 2010 5:51:41 PM
Subject: Re: [Citrusdb-users] I got error during conduct refund.
Thanks for your reply.
#1,
As I tried 'creditcard' instead of 'prepaycc', it works well same as
'prepaycc'. (almostly 100% for me)
What's exactly differences 'creditcard' and 'prepaycc'??
I could use both, since I can control billing date (upcoming).
#2,
When I tried refund I couldn't find a message such "You must manually
process ... that you said.
Anyway, I added exception code for cancel refunding before executing refund
button in tools menu.
(Since I will use it in a batch process on a regular basis.)
I hope it helps you even less :)
Thanks in everytime.
Regards.
-Eric
________________________________
Sent: Mon, April 26, 2010 9:02:33 AM
Subject: Re: [Citrusdb-users] I got error during conduct refund.
Item 1: Refunds do not currently work for prepaycc billing types,
only normal monthly creditcard bills. When you went into the refund
report to indicate the amount of the refund it would have came back
with a message: "You must manually process a refund for this billing
method" Prepaycc had sort of been deprecated as a billing type since
it's somewhat useless, except that is prevents the customer from being
charged again in X months automatically if their previous billing
failed.
Item 2: the way it handle's importing prepaycc billing types is a bug,
however the right fix for this is to change the importcc code that
inserts into payment_history to always indicate a creditcard payment
type instead of looking to whatever billing method is being used,
since the import credit card tool will always be importing credit card
payments. A prepaycc billing type is still paid with a creditcard
payment type. Billing type and Payment Type are two different things.
http://bazaar.launchpad.net/%7Epaul-citrusdb/citrusdb/gpg/revision/240
Item 3: My own card software gives me an "N" and some other software I
had gave a "38" as a code, so I just have that in there for myself.
Paul
Post by Eric Cho
Hello.
I did some of test for CitrusDB.
I'm using that based on prepaycc (pre-pay Credit card), everything was fine
but refund.
When I tried to refund in the Billing's refund menu
(http://localhost/citrus-2.1/index.php?load=refund&type=tools&billingid=45&submit=Submit),
That records didn't exported when I tried export for one text file in the
http://localhost/citrus-2.1/index.php?load=refundcc&type=tools .
(There's result file for that but content was empty.)
So, I analyzed related source, I found something miss.
1. refunded = 'y' shouldn't do there, because refund export page works as
loading refunded<>'y'
tools/refund.php line 51~61 has been changed as commentation.
2. DB scheme.
DROP TABLE IF EXISTS `payment_history`;
CREATE TABLE `payment_history` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`creation_date` DATE NOT NULL DEFAULT '0000-00-00',
`transaction_code` VARCHAR(32) DEFAULT NULL,
`billing_id` INT(11) NOT NULL DEFAULT '0',
`creditcard_number` VARCHAR(16) DEFAULT NULL,
`creditcard_expire` INT(4) UNSIGNED ZEROFILL DEFAULT NULL,
`billing_amount` DECIMAL(9,2) DEFAULT NULL,
`response_code` VARCHAR(100) DEFAULT NULL,
`paid_from` DATE NOT NULL DEFAULT '0000-00-00',
`paid_to` DATE NOT NULL DEFAULT '0000-00-00',
`invoice_number` INT(128) DEFAULT NULL,
`status`
SET('authorized','declined','pending','donotreactivate','collections','turnedoff','credit','canceled','cancelwfee','pastdue','noticesent','waiting')
DEFAULT NULL,
`payment_type`
SET('creditcard','prepaycc','check','cash','eft','nsf','discount') DEFAULT
NULL,
`check_number` VARCHAR(32) DEFAULT NULL,
`avs_response` VARCHAR(32) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `billing_id_index` (`billing_id`)
) ENGINE=MYISAM AUTO_INCREMENT=142 DEFAULT CHARSET=latin1;
(To sum up, there's only change of adding one enum for payment_type column
as 'prepaycc' next to 'creditcard')
3. Not solved yet, I passed this step by wrote response as 'No' in the
import file.
tools/importcc.php line 79~
if ($response_id == 'N') { if ($transaction_code == 'CREDIT' OR
$transaction_code == '38') {
It's weird.. CREDIT (Refund) is suppose to be 'N' as response ??
I wonder whether that is your intention or not.
My object of this mail is confirm that is whether good approach, and if so,
willing to help for you.
Please let me know if there's something wrong
Have a good weekend! :)
Regards.
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System

------------------------------------------------------------------------------
Paul Yasi
2010-04-27 20:51:23 UTC
Permalink
Ok, Eric you are in there!

Paul
Post by Eric Cho
Oh. Thanks.
This is my address for twitter. I hope you add this there.
http://twitter.com/myfoxfree
Appreciate!
-Eric
________________________________
Sent: Tue, April 27, 2010 8:58:38 AM
Subject: Re: [Citrusdb-users] I got error during conduct refund.
I've added this code in there now.  I also added your name to the code
contributor list.  Do you have a domain name you would like listed
next to your name?
http://bazaar.launchpad.net/~paul-citrusdb/citrusdb/gpg/revision/242
Thanks,
Paul
Post by Eric Cho
Oh sorry.
I forgot to attach my code in tools/refund.php
As at #2, I made this codes at line 46~
    if ($refundamount == 0) {
        $query = "UPDATE billing_details SET
        refund_amount = 0.00,
        refund_date = null
        WHERE id = $detailid";
        $result = $DB->Execute($query) or die ("$query Query Failed");
    } else {
        $query = "UPDATE billing_details SET
        refund_amount = '$refundamount',
        refund_date = CURRENT_DATE
        WHERE id = $detailid";
        $result = $DB->Execute($query) or die ("$query Query Failed");
    }
So I could cancel refunding by put price as 0.. before actually refund when
I click refund button in tools menu.
Please take a look this.
Thanks.
-Eric
________________________________
To: For users of CitrusDB discussion
Sent: Mon, April 26, 2010 5:51:41 PM
Subject: Re: [Citrusdb-users] I got error during conduct refund.
Thanks for your reply.
#1,
As I tried 'creditcard' instead of 'prepaycc', it works well same as
'prepaycc'. (almostly 100% for me)
What's exactly differences 'creditcard' and 'prepaycc'??
I could use both, since I can control billing date (upcoming).
#2,
When I tried refund I couldn't find a message such "You must manually
process ...   that you said.
Anyway, I added exception code for cancel refunding before executing refund
button in tools menu.
(Since I will use it in a batch process on a regular basis.)
I hope it helps you even less :)
Thanks in everytime.
Regards.
-Eric
________________________________
To: For users of CitrusDB discussion
Sent: Mon, April 26, 2010 9:02:33 AM
Subject: Re: [Citrusdb-users] I got error during conduct refund.
Item 1:  Refunds do not currently work for prepaycc billing types,
only normal monthly creditcard bills.  When you went into the refund
report to indicate the amount of the refund it would have came back
with a message: "You must manually process a refund for this billing
method"  Prepaycc had sort of been deprecated as a billing type since
it's somewhat useless, except that is prevents the customer from being
charged again in X months automatically if their previous billing
failed.
Item 2: the way it handle's importing prepaycc billing types is a bug,
however the right fix for this is to change the importcc code that
inserts into payment_history to always indicate a creditcard payment
type instead of looking to whatever billing method is being used,
since the import credit card tool will always be importing credit card
payments.  A prepaycc billing type is still paid with a creditcard
payment type.  Billing type and Payment Type are two different things.
http://bazaar.launchpad.net/%7Epaul-citrusdb/citrusdb/gpg/revision/240
Item 3: My own card software gives me an "N" and some other software I
had gave a "38" as a code, so I just have that in there for myself.
Paul
Post by Eric Cho
Hello.
I did some of test for CitrusDB.
I'm using that based on prepaycc (pre-pay Credit card), everything was fine
but refund.
When I tried to refund in the Billing's refund menu
(http://localhost/citrus-2.1/index.php?load=refund&type=tools&billingid=45&submit=Submit),
That records didn't exported when I tried export for one text file in the
http://localhost/citrus-2.1/index.php?load=refundcc&type=tools .
(There's result file for that but content was empty.)
So, I analyzed related source, I found something miss.
1. refunded = 'y' shouldn't do there, because refund export page works as
loading refunded<>'y'
tools/refund.php line 51~61 has been changed as commentation.
2. DB scheme.
DROP TABLE IF EXISTS `payment_history`;
CREATE TABLE `payment_history` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `creation_date` DATE NOT NULL DEFAULT '0000-00-00',
  `transaction_code` VARCHAR(32) DEFAULT NULL,
  `billing_id` INT(11) NOT NULL DEFAULT '0',
  `creditcard_number` VARCHAR(16) DEFAULT NULL,
  `creditcard_expire` INT(4) UNSIGNED ZEROFILL DEFAULT NULL,
  `billing_amount` DECIMAL(9,2) DEFAULT NULL,
  `response_code` VARCHAR(100) DEFAULT NULL,
  `paid_from` DATE NOT NULL DEFAULT '0000-00-00',
  `paid_to` DATE NOT NULL DEFAULT '0000-00-00',
  `invoice_number` INT(128) DEFAULT NULL,
  `status`
SET('authorized','declined','pending','donotreactivate','collections','turnedoff','credit','canceled','cancelwfee','pastdue','noticesent','waiting')
DEFAULT NULL,
  `payment_type`
SET('creditcard','prepaycc','check','cash','eft','nsf','discount') DEFAULT
NULL,
  `check_number` VARCHAR(32) DEFAULT NULL,
  `avs_response` VARCHAR(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `billing_id_index` (`billing_id`)
) ENGINE=MYISAM AUTO_INCREMENT=142 DEFAULT CHARSET=latin1;
(To sum up, there's only change of adding one enum for payment_type column
as 'prepaycc' next to 'creditcard')
3. Not solved yet, I passed this step by wrote response as 'No' in the
import file.
tools/importcc.php line 79~
    if ($response_id == 'N') {     if ($transaction_code == 'CREDIT' OR
$transaction_code == '38') {
It's weird.. CREDIT (Refund) is suppose to be 'N' as response ??
I wonder whether that is your intention or not.
My object of this mail is confirm that is whether good approach, and if so,
willing to help for you.
Please let me know if there's something wrong
Have a good weekend! :)
Regards.
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
------------------------------------------------------------------------------
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users
--
The CitrusDB Project | http://www.citrusdb.org
Open Source Customer Care & Billing System
Loading...