line
stmt
bran
cond
sub
pod
time
code
1
package Business::PayPal;
2
3
1
1
58707
use 5.6.1;
1
3
4
1
1
6
use strict;
1
1
1
16
5
1
1
4
use warnings;
1
2
1
33
6
7
our $VERSION = '0.19';
8
9
1
1
568
use Net::SSLeay 1.14;
1
12434
1
48
10
1
1
7
use Digest::MD5 qw(md5_hex);
1
1
1
1115
11
12
our $Cert;
13
our $Certcontent;
14
15
my @certificates;
16
# added to 0.12 on 2014.04.19
17
push @certificates, <<'CERT';
18
-----BEGIN CERTIFICATE-----
19
MIIGCDCCBPCgAwIBAgIQCDTkU9Q6aFcjr/uxM85FfDANBgkqhkiG9w0BAQUFADCB
20
ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
21
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug
22
YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr
23
VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x
24
NDA0MTUwMDAwMDBaFw0xNTA0MDIyMzU5NTlaMIIBCTETMBEGCysGAQQBgjc8AgED
25
EwJVUzEZMBcGCysGAQQBgjc8AgECEwhEZWxhd2FyZTEdMBsGA1UEDxMUUHJpdmF0
26
ZSBPcmdhbml6YXRpb24xEDAOBgNVBAUTBzMwMTQyNjcxCzAJBgNVBAYTAlVTMRMw
27
EQYDVQQRFAo5NTEzMS0yMDIxMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQH
28
FAhTYW4gSm9zZTEWMBQGA1UECRQNMjIxMSBOIDFzdCBTdDEVMBMGA1UEChQMUGF5
29
UGFsLCBJbmMuMRQwEgYDVQQLFAtDRE4gU3VwcG9ydDEXMBUGA1UEAxQOd3d3LnBh
30
eXBhbC5jb20wggEiMA0GCSqGSI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sIDnU6m8nNH9iHEVyETnARaoq
47
NVy2BuMIp48Ir4CyEM6lKFscSVUR62sqgMEJ7YJySMoZi+U0lDxQJndrGmO6b2PR
48
WO0rHbenbgQlmcOUA5DsD0yTgzWG43CEDTzOr06AStORP1UzLx9nhy8JokHAEEos
49
xIigb5Ms7zjSYcfs8zd9yTKlXB5IDoVsRyp/xjBewvYu3eNNrP/vSCbHUXRHMkYL
50
zXoKXVvFje0XvN4JvOmTqXyFnIimg7zW5R8FEN+yT6LFlwCLV8cN58dXV4d9E59c
51
XPfzzQCJDYWaonDa
52
-----END CERTIFICATE-----
53
CERT
54
55
# added to 0.14 on 2015.04.01
56
push @certificates, <<'CERT';
57
-----BEGIN CERTIFICATE-----
58
MIIGvjCCBaagAwIBAgIQWK6vRldyZAffQNciCpwKZzANBgkqhkiG9w0BAQUFADB3
59
MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd
60
BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj
61
IENsYXNzIDMgRVYgU1NMIENBIC0gRzIwHhcNMTUwMzEyMDAwMDAwWhcNMTUxMDMx
62
MjM1OTU5WjCCAQkxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIB
63
AhMIRGVsYXdhcmUxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMRAwDgYD
64
VQQFEwczMDE0MjY3MQswCQYDVQQGEwJVUzETMBEGA1UEERQKOTUxMzEtMjAyMTET
65
MBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxQIU2FuIEpvc2UxFjAUBgNVBAkU
66
DTIyMTEgTiAxc3QgU3QxFTATBgNVBAoUDFBheVBhbCwgSW5jLjEUMBIGA1UECxQL
67
Q0ROIFN1cHBvcnQxFzAVBgNVBAMUDnd3dy5wYXlwYWwuY29tMIIBIjANBgkqhkiG
68
9w0BA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AAABTBAIx7wAAAQDAEcwRQIgUYscJgszMFrBx1zbtdYs7DsNnDyeiq570NWMnm0/
85
2R0CIQCe+byVBqzuGe1SvVzZg2sDM/juENHN6afDVITPPlOwfgB3AFYUBpov18Ls
86
0/XhvUSyPsdGdrm8mRFcwO+UmFXWidDdAAABTBAIyawAAAQDAEgwRgIhANRNmPtV
87
ATw4FYVuGXESDyBU6d07gkcUsEUeVY0dD95WAiEAqBns/Pr3MX8RD1bLGriQduHO
88
tJ1FJKvWpvaSEbb6VRUwDQYJKoZIhvcNAQEFBQADggEBAJj9TEgvOyp7fqaAIUK5
89
bWkRbGCsSbUxNW4yxZxNjXwIvoI89IQwGydZkqRX7//fiKEW7iMFWN6nQXxrHKfQ
90
46DQdN8WgnLf2CqJZN3kwQrJdhsV+DJrplMJXN96QFrRXgM/BCC4e2h2dryJYsDE
91
2JKKUuU6s2DhZMJ/qnyrrFTnmTQeYwIwWdcC6txdZl3VZv+EbCZEHQDUpFvdQVmR
92
kasn+9reKda5JGTuBl22OHsF+5WWHL2nYM2Fnv1sRFOWzQfQFcIVcWbl1OdUV6SQ
93
cQRRhHyM6jwWBsVJxP5H/1byHeXZTvDRl6EaU5RRCoFZEaqWPD24X+8SRkkgkV9Y
94
n64=
95
-----END CERTIFICATE-----
96
CERT
97
98
push @certificates, <<'CERT';
99
-----BEGIN CERTIFICATE-----
100
MIIG0jCCBbqgAwIBAgIQB2T3ui0CFx+cSA3+e2W7bzANBgkqhkiG9w0BAQUFADB3
101
MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd
102
BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj
103
IENsYXNzIDMgRVYgU1NMIENBIC0gRzIwHhcNMTUwNDIyMDAwMDAwWhcNMTUxMDMx
104
MjM1OTU5WjCCAQkxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3P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ERT
139
140
# added to 0.17 on 2015.10.02
141
push @certificates, <<'CERT';
142
-----BEGIN CERTIFICATE-----
143
MIIHTTCCBjWgAwIBAgIQf8Ays2+fnhrB7auXE2UpNTANBgkqhkiG9w0BAQsFADB3
144
MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd
145
BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj
146
IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwOTAyMDAwMDAwWhcNMTcxMDMw
147
MjM1OTU5WjCCAQkxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIB
148
AgwIRGVsYXdhcmUxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMRAwDgYD
149
VQQFEwczMDE0MjY3MQswCQYDVQQGEwJVUzETMBEGA1UEEQwKOTUxMzEtMjAyMTET
150
MBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIU2FuIEpvc2UxFjAUBgNVBAkM
151
DTIyMTEgTiAxc3QgU3QxFTATBgNVBAoMDFBheVBhbCwgSW5jLjEUMBIGA1UECwwL
152
Q0ROIFN1cHBvcnQxFzAVBgNVBAMMDnd3dy5wYXlwYWwuY29tMIIBIjANBgkqhkiG
153
9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3G8cYNqcMviCcnf9UYBZa9vFajZNbopJg951
154
H5DLtlO5PEK5HLVTr1CIjeiof6amHw0h1FxvDDN+OhlY2V0B0wji0llUqcerTcb/
155
BaYLv7YREjTq1yPOPmAhvv7N22Ucr2KWPnO9CAVu6jMe1VnCcaXlIs7QF6XSrHzc
156
6ui6cBaL5ZBsfKC0eXNQXiaIo1/4R2NzUmIfxuLq9fYhQF3yGfJzBSU572/PoITp
157
pO9XrGwlzXx81DQkIAfdDQlFvZip7oPV8osFoik3DPRiF8InV53jA+OrAp36yf+B
158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gfZIK+
174
OozuuSgdTPxxUV1nk9RE0QpnrLtPT/vEAAABT5BxKnEAAAQDAEcwRQIhALUKK1wh
175
kGZHnBKN1FyOmFs1SI0MuXeyNrvuDGJ/BD28AiBays0D+G2vJXUVC6SVR5oEJEnL
176
eRiHwSh1XUc3RQYbazANBgkqhkiG9w0BAQsFAAOCAQEAm4EBf+YSO2RRvyX/Gvks
177
jxHsFVvIfKF8y7k3pKqL5RWuH8wub+qg0CKXBK40uMF47mcG4o7cKEjY3Wrxruu6
178
uO8bG23u9Pnzky9I1wXHCElCW5ja/MZ+oKvIxfYLbBtfQ1aLkD73xyP1qMQh+oBw
179
jtn19UGev1qLvOrmyugKDVjcsaP9WD1M3WUcQxPpOJ9Dx3KyGe8qUuOH1GPpWjfr
180
3iHPxRDtcejvdKLWvB/K2lCfef8TXSja+a5ml0ATYNQDRJwmZFzobM/GLrl4modk
181
JdIGuJhwGjvYvVfglJ+dXEFcThb76lJ1/A3p5ieSNpPCjIBAK0To1RS/RRiNWcfI
182
nA==
183
-----END CERTIFICATE-----
184
CERT
185
186
# added to 0.18 on 2016.08.02
187
push @certificates, <<'CERT';
188
-----BEGIN CERTIFICATE-----
189
MIIHWTCCBkGgAwIBAgIQLNGVEFQ30N5KOSAFavbCfzANBgkqhkiG9w0BAQsFADB3
190
MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd
191
BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj
192
IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwMjAyMDAwMDAwWhcNMTcxMDMw
193
MjM1OTU5WjCCAQkxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIB
194
AgwIRGVsYXdhcmUxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMRAwDgYD
195
VQQFEwczMDE0MjY3MQswCQYDVQQG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55rjwNQnA3s2WWuHGPaE/jMG17iiL2O/hUdIvLE9+wA+fWrey5//74xl
228
NeQitYiySDIepHGnng==
229
-----END CERTIFICATE-----
230
CERT
231
232
# added to 0.19 on 2020.03.07
233
push @certificates, <<'CERT';
234
-----BEGIN CERTIFICATE-----
235
MIIHmTCCBoGgAwIBAgIQDsNOdwJXAE+tzPSi9RnWDDANBgkqhkiG9w0BAQsFADB1
236
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
237
d3cuZGlnaWNlcnQuY29tMTQwMgYDVQQDEytEaWdpQ2VydCBTSEEyIEV4dGVuZGVk
238
IFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTIwMDEwOTAwMDAwMFoXDTIyMDExMjEy
239
MDAwMFowgdwxHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYB
240
BAGCNzwCAQMTAlVTMRkwFwYLKwYBBAGCNzwCAQITCERlbGF3YXJlMRAwDgYDVQQF
241
EwczMDE0MjY3MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8G
242
A1UEBxMIU2FuIEpvc2UxFTATBgNVBAoTDFBheVBhbCwgSW5jLjEUMBIGA1UECxML
243
Q0ROIFN1cHBvcnQxFzAVBgNVBAMTDnd3dy5wYXlwYWwuY29tMIIBIjANBgkqhkiG
244
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq5rER+ZPS/B6KW+aHWtO1QQOsgLtjdGprtXa
245
IIx+ikkaPAkT93LuLkDgKUECeJdV+AYNeyrj4LPlZPLeuLg14cV86xLjaEd0bLwE
246
JTMJFyjgyTqyTmVQ0ErkO7LhLoJFy1IFO6S3N+vIKfxDZ8xmqeWfIhsb94Y2NZtF
247
9Q9sPR0VVV3+yn1c7x12t/BZhYkaydK/WLwmnBF1YMtZ5nQY7g4GvFShR/n1tcC+
248
rW3u3Zm2UO2FM/W9k0tmqQjwZ8e9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aatw3NDzrR/v+k9XDjgAbEioeJmcjDKUlyEkAHYAVhQG
265
mi/XwuzT9eG9RLI+x0Z2ubyZEVzA75SYVdaJ0N0AAAFvh7/UXwAABAMARzBFAiEA
266
/5GV9keLQVjAvRlzi5+YoFzymiQiKvJkD0i33kAijdwCIEuaqfF5owFlEMq8/CT1
267
Cp2aGgUQ8C4M78yprySEEymgAHUA7ku9t3XOYLrhQmkfq+GeZqMPfl+wctiDAMR7
268
iXqo/csAAAFvh7/TxQAABAMARjBEAiAI/pmrL76VNgjgI/f6De5QokYAUdP0inWM
269
dGICpFNcigIgE4pM5uLHDTg560kp1CNDTPpLAYzS28t/OUyEFOSk3SQwDQYJKoZI
270
hvcNAQELBQADggEBAJUGjFwcOaoZMwxwWH+UK6RxvvcTTiNz8Kh8NRYO4r5ZVj2M
271
XfqM+93ejjSjarOGWylSSl/3yx8zuMhgOzBylPxh312AL/mPrfOFmCro7WwC4T7Q
272
zO9oNk6uUW3KLnuuo3k9J2d0FU3PyR2h+UNpzmay6+zEMUgn2S3i6/RyCnMj0Zxd
273
jjSylaOoCRbOL7/R+Ee9wW02fjqcWMFHQJKOtjKXiV77RsM9LAZGI4YqbNI6GD46
274
K/zDOsAXakwy9dKoqaNfKlPJv4ifD8Z0Y32DF0lgctLLybgCWPfZ8Dz+H03760Og
275
+lieGRy3bEXsDLkNSgm+dmg1SGJcgjyA5Od7Zvc=
276
-----END CERTIFICATE-----
277
CERT
278
279
# NEXT @certificates comes here
280
# added to 0.17 on 2015.10.02
281
# push @certificates, <<'CERT';
282
# CERT
283
284
chomp(@certificates);
285
286
my @cert_contents;
287
push @cert_contents, <<'CERTCONTENT';
288
Subject Name: /1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/businessCategory=Private Organization/serialNumber=3014267/C=US/postalCode=95131-2021/ST=California/L=San Jose/street=2211 N 1st St/O=PayPal, Inc./OU=CDN Support/CN=www.paypal.com
289
Issuer Name: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)06/CN=VeriSign Class 3 Extended Validation SSL CA
290
CERTCONTENT
291
292
push @cert_contents, <<'CERTCONTENT';
293
Subject Name: /1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/businessCategory=Private Organization/serialNumber=3014267/C=US/postalCode=95131-2021/ST=California/L=San Jose/street=2211 N 1st St/O=PayPal, Inc./OU=CDN Support/CN=www.paypal.com
294
Issuer Name: /C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 EV SSL CA - G2
295
CERTCONTENT
296
297
# added to 0.17 on 2015.10.02
298
push @cert_contents, <<'CERTCONTENT';
299
Subject Name: /1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/businessCategory=Private Organization/serialNumber=3014267/C=US/postalCode=95131-2021/ST=California/L=San Jose/street=2211 N 1st St/O=PayPal, Inc./OU=CDN Support/CN=www.paypal.com
300
Issuer Name: /C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 EV SSL CA - G3
301
CERTCONTENT
302
303
# added to 0.19 on 2020.03.07
304
push @cert_contents, <<'CERTCONTENT';
305
Subject Name: /businessCategory=Private Organization/jurisdictionC=US/jurisdictionST=Delaware/serialNumber=3014267/C=US/ST=California/L=San Jose/O=PayPal, Inc./OU=CDN Support/CN=www.paypal.com
306
Issuer Name: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
307
CERTCONTENT
308
309
chomp(@cert_contents);
310
311
# creates new PayPal object. Assigns an id if none is provided.
312
sub new {
313
4
4
1
9286
my $class = shift;
314
315
4
17
my $self = {
316
id => undef,
317
address => 'https://www.paypal.com/cgi-bin/webscr',
318
check_cert => 1,
319
@_,
320
};
321
4
6
bless $self, $class;
322
4
100
79
$self->{id} = md5_hex(rand()) unless $self->{id};
323
324
4
12
return $self;
325
}
326
327
sub check_cert {
328
2
2
0
3043
my ($self, $value) = @_;
329
2
6
$self->{check_cert} = $value;
330
2
4
return;
331
}
332
333
# returns current PayPal id
334
sub id {
335
2
2
1
1325
my ($self) = @_;
336
337
2
6
return $self->{id};
338
}
339
340
#creates a PayPal button
341
sub button {
342
3
3
1
920
my $self = shift;
343
344
my %buttonparam = (
345
cmd => '_ext-enter',
346
redirect_cmd => '_xclick',
347
button_image => qq{ },
348
business => undef,
349
item_name => undef,
350
item_number => undef,
351
image_url => undef,
352
no_shipping => 1,
353
return => undef,
354
cancel_return => undef,
355
no_note => 1,
356
undefined_quantity => 0,
357
notify_url => undef,
358
first_name => undef,
359
last_name => undef,
360
shipping => undef,
361
shipping2 => undef,
362
quantity => undef,
363
amount => undef,
364
address1 => undef,
365
address2 => undef,
366
city => undef,
367
state => undef,
368
zip => undef,
369
night_phone_a => undef,
370
night_phone_b => undef,
371
night_phone_c => undef,
372
day_phone_a => undef,
373
day_phone_b => undef,
374
day_phone_c => undef,
375
receiver_email => undef,
376
invoice => undef,
377
currency_code => undef,
378
custom => $self->{id},
379
3
69
@_,
380
);
381
3
6
my $key;
382
3
12
my $form_id = '';
383
3
100
10
if (defined $buttonparam{form_id}) {
384
1
3
$form_id = qq{id="$buttonparam{form_id}"};
385
1
2
delete $buttonparam{form_id};
386
}
387
3
13
my $content = qq{
388
389
3
54
foreach my $param (sort keys %buttonparam) {
390
106
100
150
next if not defined $buttonparam{$param};
391
38
100
92
next if $param eq 'button_image';
392
35
61
$content .= qq{ \n};
393
}
394
3
18
$content .= "$buttonparam{button_image}\n";
395
3
4
$content .= qq{\n};
396
397
3
20
return $content;
398
}
399
400
401
# takes a reference to a hash of name value pairs, such as from a CGI query
402
# object, which should contain all the name value pairs which have been
403
# posted to the script by PayPal's Instant Payment Notification
404
# posts that data back to PayPal, checking if the ssl certificate matches,
405
# and returns success or failure, and the reason.
406
sub ipnvalidate {
407
3
3
1
1232
my ($self, $query) = @_;
408
409
3
8
$query->{cmd} = '_notify-validate';
410
3
6
my $id = $self->{id};
411
3
10
my ($succ, $reason) = $self->postpaypal($query);
412
413
3
0
12
return (wantarray ? ($id, $reason) : $id ) if $succ;
50
414
3
100
26
return (wantarray ? (undef, $reason) : undef);
415
}
416
417
# this method should not normally be used unless you need to test, or if
418
# you are overriding the behaviour of ipnvalidate. It takes a reference
419
# to a hash containing the query, posts to PayPal with the data, and returns
420
# success or failure, as well as PayPal's response.
421
sub postpaypal {
422
3
3
1
8
my ($self, $query) = @_;
423
424
3
6
my $address = $self->{address};
425
3
6
my ($site, $port, $path);
426
427
#following code splits an url into site, port and path components
428
3
14
my @address = split /:\/\//, $address, 2;
429
3
17
@address = split /(?=\/)/, $address[1], 2;
430
3
50
14
if ($address[0] =~ /:/) {
431
0
0
($site, $port) = split /:/, $address[0];
432
}
433
else {
434
3
8
($site, $port) = ($address[0], '443');
435
}
436
3
6
$path = $address[1];
437
3
55
my ($page,
438
$response,
439
$headers,
440
$ppcert,
441
) = Net::SSLeay::post_https3($site,
442
$port,
443
$path,
444
'',
445
Net::SSLeay::make_form(%$query));
446
447
3
0
4455935
return (wantarray ? (undef, "No PayPal cert found") : undef)
50
448
unless $ppcert;
449
450
3
94
my $ppx509 = Net::SSLeay::PEM_get_string_X509($ppcert);
451
3
85
my $ppcertcontent =
452
'Subject Name: '
453
. Net::SSLeay::X509_NAME_oneline(
454
Net::SSLeay::X509_get_subject_name($ppcert))
455
. "\nIssuer Name: "
456
. Net::SSLeay::X509_NAME_oneline(
457
Net::SSLeay::X509_get_issuer_name($ppcert))
458
. "\n";
459
460
3
11
chomp $ppx509;
461
3
7
chomp $ppcertcontent;
462
463
3
19
my @certs = @certificates;
464
3
50
12
if ($Cert) {
465
# TODO added in 0.12
466
0
0
warn "The global variable \$Cert is deprecated and will be removed soon. Pass a certificate to the constructor using the 'cert' parameter.\n";
467
0
0
push @certs, $Cert;
468
}
469
3
12
my @cert_cont = @cert_contents;
470
3
50
9
if ($Certcontent) {
471
# TODO added in 0.12
472
0
0
warn "The global variable \$Certcontent is deprecated and will be removed soon. Pass a certificate to the constructor using the 'certcontent' parameter.\n";
473
0
0
push @cert_cont, $Certcontent;
474
}
475
476
3
50
16
if ($self->{addcert}) {
477
0
0
push @certs, $self->{cert};
478
}
479
3
50
10
if ($self->{addcertcontent}) {
480
0
0
push @cert_cont, $self->{certcontent};
481
}
482
483
3
50
12
if ($self->{cert}) {
484
0
0
@certs = $self->{cert};
485
}
486
3
50
13
if ($self->{certcontent}) {
487
0
0
@cert_cont = $self->{certcontent};
488
}
489
490
3
100
11
if ($self->{check_cert}) {
491
return (wantarray ? (undef, "PayPal cert failed to match:\n$ppx509") : undef)
492
2
0
7
unless grep {$_ eq $ppx509} @certs;
12
50
30
493
return (wantarray ? (undef, "PayPal cert contents failed to match:\n$ppcertcontent") : undef)
494
2
0
5
unless grep { $_ eq $ppcertcontent } @cert_cont;
8
50
16
495
}
496
3
50
28
return (wantarray ? (undef, 'PayPal says transaction INVALID') : undef)
50
497
if $page eq 'INVALID';
498
0
0
return (wantarray ? (1, 'PayPal says transaction VERIFIED') : 1)
0
499
if $page eq 'VERIFIED';
500
0
warn "Bad stuff happened\n$page";
501
0
0
return (wantarray ? (undef, "Bad stuff happened") :undef);
502
}
503
504
505
506
1;
507
508
=head1 NAME
509
510
Business::PayPal - Perl extension for automating PayPal transactions
511
512
=head1 ABSTRACT
513
514
Business::PayPal makes the automation of PayPal transactions as simple
515
as doing credit card transactions through a regular processor. It includes
516
methods for creating PayPal buttons and for validating the Instant Payment
517
Notification that is sent when PayPal processes a payment.
518
519
=head1 SYNOPSIS
520
521
To generate a PayPal button for use on your site
522
Include something like the following in your CGI
523
524
use Business::PayPal;
525
my $paypal = Business::PayPal->new;
526
my $button = $paypal->button(
527
business => 'dr@dursec.com',
528
item_name => 'CanSecWest Registration Example',
529
return => 'http://www.cansecwest.com/return.cgi',
530
cancel_return => 'http://www.cansecwest.com/cancel.cgi',
531
amount => '1600.00',
532
quantity => 1,
533
notify_url => http://www.cansecwest.com/ipn.cgi
534
);
535
my $id = $paypal->id;
536
537
Store $id somewhere so we can get it back again later
538
539
Store current context with $id.
540
541
Print button to the browser.
542
543
Note, button is an HTML form, already enclosed in tags
544
545
546
547
To validate the Instant Payment Notification from PayPal for the
548
button used above include something like the following in your
549
'notify_url' CGI.
550
551
use CGI;
552
my $query = CGI->new;
553
my %query = $query->Vars;
554
my $id = $query{custom};
555
my $paypal = Business::PayPal->new(id => $id);
556
my ($txnstatus, $reason) = $paypal->ipnvalidate(\%query);
557
die "PayPal failed: $reason" unless $txnstatus;
558
my $money = $query{payment_gross};
559
my $paystatus = $query{payment_status};
560
561
Check if paystatus eq 'Completed'.
562
Check if $money is the amount you expected.
563
Save payment status information to store as $id.
564
565
566
To tell the user if their payment succeeded or not, use something like
567
the following in the CGI pointed to by the 'return' parameter in your
568
PayPal button.
569
570
use CGI;
571
my $query = CGI->new;
572
my $id = $query{custom};
573
574
#get payment status from store for $id
575
#return payment status to customer
576
577
In order to use the sandbox provided by PayPal, you can provide the address of the sandbox
578
in the constructor:
579
580
my $pp = Business::PayPal->new( address => 'https://www.sandbox.paypal.com/cgi-bin/webscr' );
581
582
=head1 DESCRIPTION
583
584
=head2 new()
585
586
Creates a new Business::PayPal object, it can take the
587
following parameters:
588
589
=over 2
590
591
=item id
592
593
The Business::PayPal object id, if not specified a new
594
id will be created using md5_hex(rand())
595
596
=item address
597
598
The address of PayPal's payment server, currently:
599
https://www.paypal.com/cgi-bin/webscr
600
601
=item cert
602
603
The x509 certificate for I, see source for default.
604
605
=item certcontent
606
607
The contents of the x509 certificate I, see source for
608
default.
609
610
=item addcert
611
612
The x509 certificate for I.
613
This is added to the default values.
614
615
=item addcertcontent
616
617
The contents of the x509 certificate I,
618
This is added to the default values.
619
620
=back
621
622
=head2 id()
623
624
Returns the id for the Business::PayPal object.
625
626
=head2 button()
627
628
Returns the HTML for a PayPal button. It takes a large number of
629
parameters, which control the look and function of the button, some
630
of which are required and some of which have defaults. They are
631
as follows:
632
633
=over 2
634
635
=item cmd
636
637
required, defaults to '_ext-enter'
638
639
This allows the user information to be pre-filled in.
640
You should never need to specify this, as the default should
641
work fine.
642
643
=item redirect_cmd
644
645
required, defaults to '_xclick'
646
647
This allows the user information to be pre-filled in.
648
You should never need to specify this, as the default should
649
work fine.
650
651
=item button_image
652
653
required, defaults to:
654
655
CGI::image_button(-name => 'submit',
656
-src => 'http://images.paypal.com/x-click-but01.gif'
657
-alt => 'Make payments with PayPal',
658
)
659
660
You may wish to change this if the button is on an https page
661
so as to avoid the browser warnings about insecure content on a
662
secure page.
663
664
for example use a Bootstrap style button:
665
666
button_image => '9 USD per month ',
667
668
=item form_id
669
670
form_id => 'some_id',
671
672
Adding id="some_id" to the form created. Adding and id will make it easier to locate
673
the form on the page by some JavaScript code.
674
675
=item business
676
677
required, no default
678
679
This is the name of your PayPal account.
680
681
=item item_name
682
683
This is the name of the item you are selling.
684
685
=item item_number
686
687
This is a numerical id of the item you are selling.
688
689
=item image_url
690
691
A URL pointing to a 150 x 50 image which will be displayed
692
instead of the name of your PayPal account.
693
694
=item no_shipping
695
696
defaults to 1
697
698
If set to 1, does not ask customer for shipping info, if
699
set to 0 the customer will be prompted for shipping information.
700
701
=item return
702
703
This is the URL to which the customer will return to after
704
they have finished paying.
705
706
=item cancel_return
707
708
This is the URL to which the customer will be sent if they cancel
709
before paying.
710
711
=item no_note
712
713
defaults to 1
714
715
If set to 1, does not ask customer for a note with the payment,
716
if set to 0, the customer will be asked to include a note.
717
718
=item currency_code
719
720
Currency the payment should be taken in, e.g. EUR, GBP.
721
If not specified payments default to USD.
722
723
=item address1
724
725
=item undefined_quantity
726
727
defaults to 0
728
729
If set to 0 the quantity defaults to 1, if set to 1 the user
730
can edit the quantity.
731
732
=item notify_url
733
734
The URL to which PayPal Instant Payment Notification is sent.
735
736
=item first_name
737
738
First name of customer, used to pre-fill PayPal forms.
739
740
=item last_name
741
742
Last name of customer, used to pre-fill PayPal forms.
743
744
=item shipping
745
746
I don't know, something to do with shipping, please tell me if
747
you find out.
748
749
=item shipping2
750
751
I don't know, something to do with shipping, please tell me if you
752
find out.
753
754
=item quantity
755
756
defaults to 1
757
758
Number of items being sold.
759
760
=item amount
761
762
Price of the item being sold.
763
764
=item address1
765
766
Address of customer, used to pre-fill PayPal forms.
767
768
=item address2
769
770
Address of customer, used to pre-fill PayPal forms.
771
772
=item city
773
774
City of customer, used to pre-fill PayPal forms.
775
776
=item state
777
778
State of customer, used to pre-fill PayPal forms.
779
780
=item zip
781
782
Zip of customer, used to pre-fill PayPal forms.
783
784
=item night_phone_a
785
786
Phone
787
788
=item night_phone_b
789
790
Phone
791
792
=item night_phone_c
793
794
Phone
795
796
=item day_phone_a
797
798
Phone
799
800
=item day_phone_b
801
802
Phone
803
804
=item day_phone_c
805
806
Phone
807
808
=item receiver_email
809
810
Email address of customer - I think
811
812
=item invoice
813
814
Invoice number - I think
815
816
=item custom
817
818
defaults to the Business::PayPal id
819
820
Used by Business::PayPal to track which button is associated
821
with which Instant Payment Notification.
822
823
=back
824
825
=head2 ipnvalidate()
826
827
Takes a reference to a hash of name value pairs, such as from a
828
CGI query object, which should contain all the name value pairs
829
which have been posted to the script by PayPal's Instant Payment
830
Notification posts that data back to PayPal, checking if the ssl
831
certificate matches, and returns success or failure, and the
832
reason.
833
834
=head2 postpaypal()
835
836
This method should not normally be used unless you need to test,
837
or if you are overriding the behaviour of ipnvalidate. It takes a
838
reference to a hash containing the query, posts to PayPal with
839
the data, and returns success or failure, as well as PayPal's
840
response.
841
842
=head1 MAINTAINER
843
844
Gabor Szabo, L , L
845
846
phred, Efred@redhotpenguin.comE
847
848
=head1 AUTHOR
849
850
mock, Emock@obscurity.orgE
851
852
=head1 SEE ALSO
853
854
L, L, L.
855
856
Explanation of the fields: L
857
See also in the pdf here: L
858
859
860
=head1 LICENSE
861
862
Copyright (c) 2010, phred Efred@redhotpenguin.comE. All rights reserved.
863
864
Copyright (c) 2002, mock Emock@obscurity.orgE. All rights reserved.
865
866
This library is free software; you can redistribute it and/or modify
867
it under the same terms as Perl itself.
868
869
=cut