View | Details | Raw Unified | Return to bug 11622
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt (+48 lines)
Line 0 Link Here
1
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your payment
2
[% INCLUDE 'doc-head-close.inc' %]
3
[% BLOCK cssinclude %][% END %]
4
</head>
5
6
<body id="opac-account-pay-return" class="scrollto">
7
[% INCLUDE 'masthead.inc' %]
8
9
<div class="main">
10
    <ul class="breadcrumb">
11
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
12
        <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">&rsaquo;</span></li>
13
        <li><a href="#">Your payment</a></li>
14
    </ul>
15
16
    <div class="container-fluid">
17
        <div class="row-fluid">
18
            <div class="span2">
19
                <div id="navigation">
20
                    [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
21
                </div>
22
            </div>
23
            <div class="span10">
24
                <div id="useraccount" class="maincontent">
25
                    [% IF error %]
26
                        <div id="error" class="dialog alert">
27
                            <p><strong>Error:</strong> there was an problem processing your payment</p>
28
29
                            [% IF error == "PAYPAL_UNABLE_TO_CONNECT" %]
30
                                <p>Unable to connect to PayPal.</p>
31
                                <p>Please try again later.</p>
32
                            [% ELSIF error == "PAYPAL_ERROR_PROCESSING" %]
33
                                <p>Unable to verify payment.</p>
34
                                <p>Please contact the library to verify your payment.</p>
35
                            [% END %]
36
                        </div>
37
                    [% END %]
38
39
                    <a href="/cgi-bin/koha/opac-account.pl">Return to fine details</a>
40
                </div> <!-- / #useraccount -->
41
            </div> <!-- / .span10 -->
42
        </div> <!-- / .row-fluid -->
43
    </div> <!-- / .container-fluid -->
44
</div> <!-- / .main -->
45
46
[% INCLUDE 'opac-bottom.inc' %]
47
48
[% BLOCK jsinclude %][% END %]
(-)a/opac/opac-account-pay-paypal-return.pl (-2 / +6 lines)
Lines 30-35 use C4::Auth; Link Here
30
use C4::Output;
30
use C4::Output;
31
use C4::Accounts;
31
use C4::Accounts;
32
use C4::Members;
32
use C4::Members;
33
use C4::Budgets qw(GetCurrency);
33
use Koha::Database;
34
use Koha::Database;
34
35
35
my $cgi = new CGI;
36
my $cgi = new CGI;
Lines 49-54 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
49
    }
50
    }
50
);
51
);
51
52
53
my $active_currency = GetCurrency();
54
52
my $token    = $cgi->param('token');
55
my $token    = $cgi->param('token');
53
my $payer_id = $cgi->param('PayerID');
56
my $payer_id = $cgi->param('PayerID');
54
my $amount   = $cgi->param('amount');
57
my $amount   = $cgi->param('amount');
Lines 75-85 my $nvp_params = { Link Here
75
    'PAYERID'                        => $payer_id,
78
    'PAYERID'                        => $payer_id,
76
    'TOKEN'                          => $token,
79
    'TOKEN'                          => $token,
77
    'PAYMENTREQUEST_0_AMT'           => $amount,
80
    'PAYMENTREQUEST_0_AMT'           => $amount,
81
    'PAYMENTREQUEST_0_CURRENCYCODE'  => $active_currency->{currency},
78
};
82
};
79
83
80
my $response = $ua->request( POST $url, $nvp_params );
84
my $response = $ua->request( POST $url, $nvp_params );
81
85
82
my $error;
86
my $error = q{};
83
if ( $response->is_success ) {
87
if ( $response->is_success ) {
84
    my $params = url_params_mixed( $response->decoded_content );
88
    my $params = url_params_mixed( $response->decoded_content );
85
89
Lines 98-104 if ( $response->is_success ) { Link Here
98
102
99
}
103
}
100
else {
104
else {
101
    $error => "PAYPAL_UNABLE_TO_CONNECT";
105
    $error = "PAYPAL_UNABLE_TO_CONNECT";
102
}
106
}
103
107
104
$template->param(
108
$template->param(
(-)a/opac/opac-account-pay.pl (-2 / +1 lines)
Lines 42-48 unless ( C4::Context->preference('EnablePayPalOpacPayments') ) { Link Here
42
42
43
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
43
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
44
    {
44
    {
45
        template_name   => "opac-account-pay-return.tt",
45
        template_name   => "opac-account-pay-error.tt",
46
        query           => $cgi,
46
        query           => $cgi,
47
        type            => "opac",
47
        type            => "opac",
48
        authnotrequired => 0,
48
        authnotrequired => 0,
49
- 

Return to bug 11622