[Koha-bugs] [Bug 17705] Payments with cards through payment terminal

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 25 11:15:31 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17705

--- Comment #13 from Josef Moravec <josef.moravec at gmail.com> ---
Comment on attachment 76367
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76367
Bug 17705: payments using payment terminal

Review of attachment 76367:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17705&attachment=76367)
-----------------------------------------------------------------

Radek, I just rebased your patches and have some comments on this patch:

::: Koha/PosTerminal/Client.pm
@@ +15,5 @@
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with Koha; if not, see <http://www.gnu.org/licenses>.
> +

use Modern::Perl;

@@ +19,5 @@
> +
> +use IO::Socket::INET;
> +use IO::Socket::Timeout;
> +use Koha::PosTerminal::Message;
> +use Errno qw(ETIMEDOUT EWOULDBLOCK);

You are adding some new dependencies here, you should add them to
C4/Installer/PerlDependecies.pm, are they all available also for Debian in
needed versions?

::: Koha/PosTerminal/Message.pm
@@ +17,5 @@
> +# You should have received a copy of the GNU General Public License
> +# along with Koha; if not, see <http://www.gnu.org/licenses>.
> +
> +use strict;
> +use warnings;

use Modern::Perl;

@@ +22,5 @@
> +
> +use Digest::CRC;
> +use Koha::PosTerminal::Message::Header;
> +use Koha::PosTerminal::Message::Field;
> +use Data::Dumper qw( Dumper );

Don't forget to remove debug printing;

@@ +178,5 @@
> +        else {
> +            $self->setValid(0);
> +        }
> +    }
> +#    print Dumper($self);

Don't forget to remove debug printing;

@@ +221,5 @@
> +    my $msg = $self->getHeader()->dumpObject();
> +
> +    $msg .= "data:\n";
> +#    print Dumper($self);
> +#die();

Don't forget to remove debug printing;

::: Koha/PosTerminal/Message/Field.pm
@@ +17,5 @@
> +# You should have received a copy of the GNU General Public License
> +# along with Koha; if not, see <http://www.gnu.org/licenses>.
> +
> +use strict;
> +use warnings;

use Modern::Perl;

::: Koha/PosTerminal/Message/Header.pm
@@ +17,5 @@
> +# You should have received a copy of the GNU General Public License
> +# along with Koha; if not, see <http://www.gnu.org/licenses>.
> +
> +use strict;
> +use warnings;

use Modern::Perl;

::: koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
@@ +75,5 @@
>            [% IF ( account.payment ) %]
>              <a href="boraccount.pl?action=reverse&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-undo"></i> Reverse</a>
>              <a href="boraccount.pl?action=void&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-ban"></i> Void</a>
> +            [% IF (account.amountoutstanding+0 + account.amount+0 != 0 ) %]
> +            <a href="boraccount.pl?action=reverse&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs" onclick="refundPayment(this.href, [% account.accountlines_id %], [% -1*account.amount %]);return false;"><i class="fa fa-undo"></i> Refund to card</a>

Do not use onclick parameter

::: koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
@@ +46,4 @@
>  [% END %]
>  
>  [% IF ( pay_individual ) %]
> +    <form name="payindivfine" id="payindivfine" method="post" onsubmit="return makePayment(this);" action="/cgi-bin/koha/members/paycollect.pl">

Do not use onsubmit parameter

@@ +105,5 @@
> +    <li>
> +        <label for="bycard">Pay by card: </label>
> +        <input type="checkbox" name="bycard" id="bycard" value="1"/>
> +    </li>
> +[% END %]

Consider using PAYMENT_TYPE authorised value

::: svc/pos_terminal
@@ +160,5 @@
> +
> +    # send abort message
> +    my $abort = new Koha::PosTerminal::Message(Koha::PosTerminal::Message::DIR_SENT);
> +    my $hdrAbort = $abort->getHeader();
> +die(Dumper($transaction ? $transaction->getHeader() : "BUBU"));

What does "BUBU" mean? :D

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list