~ubuntu-branches/ubuntu/raring/libbusiness-onlinepayment-ippay-perl/raring

« back to all changes in this revision

Viewing changes to debian/patches/gateway.patch

  • Committer: Package Import Robot
  • Author(s): gregor herrmann
  • Date: 2012-10-30 17:59:17 UTC
  • Revision ID: package-import@ubuntu.com-20121030175917-1q7dm1lkof1z59rb
Tags: 0.06-2
* Team upload.
* New patch gateway.patch: change IPPay gateway server/path. Thanks to
  Ivan Kohler for backporting the patch. (Closes: #691723)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: IPPay changed the gateway's server name and path, and will soon
 
2
 turn off the old gateway
 
3
Origin: https://www.freeside.biz/gitweb/?p=Business-OnlinePayment-IPPay.git;a=commitdiff;h=1f19e67636476c7119cfb41920c5b176e617c697
 
4
Bug-Debian: #691723
 
5
Author: Ivan Kohler <ivan-debian@420.am>
 
6
Reviewed-by: gregor herrmann <gregoa@debian.org>
 
7
Last-Update: 2012-10-30
 
8
Applied-Upstream: yes, 0.07
 
9
 
 
10
--- a/IPPay.pm
 
11
+++ b/IPPay.pm
 
12
@@ -45,9 +45,9 @@
 
13
     my %opts = @_;
 
14
 
 
15
     # standard B::OP methods/data
 
16
-    $self->server('gateway17.jetpay.com') unless $self->server;
 
17
+    $self->server('gtwy.ippay.com') unless $self->server;
 
18
     $self->port('443') unless $self->port;
 
19
-    $self->path('/jetpay') unless $self->path;
 
20
+    $self->path('/ippay') unless $self->path;
 
21
 
 
22
     $self->build_subs(qw( order_number avs_code cvv2_response
 
23
                           response_page response_code response_headers
 
24
@@ -209,6 +209,9 @@
 
25
   foreach ( keys ( %{($self->{_defaults})} ) ) {
 
26
     $content{$_} = $self->{_defaults}->{$_} unless exists($content{$_});
 
27
   }
 
28
+  if ($self->test_transaction()) {
 
29
+    $content{'login'} = 'TESTTERMINAL';
 
30
+  }
 
31
   $self->content(%content);
 
32
 
 
33
   $self->required_fields(@required_fields);
 
34
@@ -221,12 +224,6 @@
 
35
     }
 
36
   }
 
37
 
 
38
-  if ($self->test_transaction()) {
 
39
-    $self->server('test1.jetpay.com');
 
40
-    $self->port('443');
 
41
-    $self->path('/jetpay');
 
42
-  }
 
43
-
 
44
   my $transaction_id = $content{'order_number'};
 
45
   unless ($transaction_id) {
 
46
     my ($page, $server_response, %headers) = $self->https_get('dummy' => 1);
 
47
@@ -391,7 +388,7 @@
 
48
     if (  exists($response->{ActionCode}) && !exists($response->{ErrMsg})) {
 
49
       $self->error_message($response->{ResponseText});
 
50
     }else{
 
51
-      $self->error_message($response->{Errmsg});
 
52
+      $self->error_message($response->{ErrMsg});
 
53
     }
 
54
 #  }else{
 
55
 #    $self->error_message("Server Failed");
 
56
@@ -588,6 +585,9 @@
 
57
 
 
58
 =head1 COMPATIBILITY
 
59
 
 
60
+Debian version 0.06-2 (upstream version 0.07) changes the server name and path
 
61
+for IPPay's late 2012 update.
 
62
+
 
63
 Business::OnlinePayment::IPPay uses IPPay XML Product Specifications version
 
64
 1.1.2.
 
65
 
 
66
--- a/t/card.t
 
67
+++ b/t/card.t
 
68
@@ -61,8 +61,8 @@
 
69
     $tx,
 
70
     desc          => "invalid card_number",
 
71
     is_success    => 0,
 
72
-    result_code   => '912',
 
73
-    error_message => 'INVALID CARD NUMBER',
 
74
+    result_code   => '900', #'912' with old jetpay gw
 
75
+    error_message => 'Invalid card number.  ', #'INVALID CARD NUMBER' w/old gw
 
76
     authorization => qr/^$/,
 
77
     avs_code      => '',           # so rather pointless :\
 
78
     cvv2_response => '',           # ...
 
79
--- a/t/lib/test_account.pl
 
80
+++ b/t/lib/test_account.pl
 
81
@@ -12,7 +12,7 @@
 
82
 sub test_account {
 
83
     my $suffix = shift || 'card';
 
84
 
 
85
-    my($login, $password) = ('TESTMERCHANT', '');
 
86
+    my($login, $password) = ('TESTTERMINAL', '');
 
87
 
 
88
     my %opt;
 
89
     if ( $suffix eq 'check ' ) {