1Business::PayPal::API::UDsierrecCtoPnatyrmiebnuttse(d3B)PuesrilneDsosc:u:mPeanytPaatli:o:nAPI::DirectPayments(3)
2
3
4

NAME

6       Business::PayPal::API::DirectPayments - PayPal DirectPayments API
7

VERSION

9       version 0.77
10

SYNOPSIS

12           use Business::PayPal::API qw(DirectPayments);
13
14           ## see Business::PayPal::API documentation for parameters
15
16           my $pp = Business::PayPal::API->new(
17                               Username => 'name_api1.example.org',
18                               Password => 'somepass',
19                               CertFile => '/path/to/tester1.cert_key_pem.txt',
20                               KeyFile  => '/path/to/tester1.cert_key_pem.txt',
21                               sandbox  => 1,
22                               );
23
24           my %response = $pp->DoDirectPaymentRequest (
25                               PaymentAction      => 'Sale',
26                               OrderTotal         => 13.59,
27                               TaxTotal           => 0.0,
28                               ShippingTotal      => 0.0,
29                               ItemTotal          => 0.0,
30                               HandlingTotal      => 0.0,
31                               InvoiceID          => 'your-tracking-number',
32                               CreditCardType     => 'Visa',
33                               CreditCardNumber   => '4561435600988217',
34                               ExpMonth           => '01',
35                               ExpYear            => '2007',
36                               CVV2               => '123',
37                               FirstName          => 'James',
38                               LastName           => 'PuffDaddy',
39                               Street1            => '1st Street LaCausa',
40                               Street2            => '',
41                               CityName           => 'La',
42                               StateOrProvince    => 'Ca',
43                               PostalCode         => '90210',
44                               Country            => 'US',
45                               Payer              => 'Joe@Example.org',
46                               ShipToName         => 'Jane Doe',
47                               ShipToStreet1      => '1234 S. Pleasant St.',
48                               ShipToStreet2      => 'Suite #992',
49                               ShipToCityName     => 'Vacation Town',
50                               ShipToStateOrProvince => 'FL',
51                               ShipToCountry      => 'US',
52                               ShipToPostalCode   => '12345',
53                               CurrencyID         => 'USD',
54                               IPAddress          => '10.0.0.1',
55                               MerchantSessionID  => '10113301',
56                               );
57

DESCRIPTION

59       Business::PayPal::API::DirectPayments implements PayPal's
60       DirectPayments API using SOAP::Lite to make direct API calls to
61       PayPal's SOAP API server. It also implements support for testing via
62       PayPal's sandbox. Please see Business::PayPal::API for details on using
63       the PayPal sandbox.
64
65   DoDirectPaymentRequest
66       Implements PayPal's DoDirectPaymentRequest API call. Supported
67       parameters include:
68
69               PaymentAction           ( Sale|Authorize, Sale is default )
70               OrderTotal
71               TaxTotal
72               ShippingTotal
73               ItemTotal
74               HandlingTotal
75               InvoiceID
76               CreditCardType
77               CreditCardNumber
78               ExpMonth                ( two digits, leading zero )
79               ExpYear                 ( four digits, 20XX )
80               CVV2
81               FirstName
82               LastName
83               Street1
84               Street2
85               CityName
86               StateOrProvince
87               PostalCode
88               Country
89               Payer
90               ShipToName
91               ShipToStreet1
92               ShipToStreet2
93               ShipToCityName
94               ShipToStateOrProvince
95               ShipToCountry
96               ShipToPostalCode
97               CurrencyID              (USD is default)
98               IPAddress
99               MerchantSessionID
100
101       as described in the PayPal "Web Services API Reference" document.
102
103       Returns a hash containing the results of the transaction. The Ack
104       element and TransactionID are the most useful return values.
105
106       Example:
107
108         my %resp = $pp->DoDirectPaymentRequest(
109                           PaymentAction => 'Sale',
110                           OrderTotal    => '10.99',
111                           ...
112                    );
113
114         unless( $resp{Ack} !~ /Success/ ) {
115             for my $error ( @{$response{Errors}} ) {
116                 warn "Error: " . $error->{LongMessage} . "\n";
117             }
118         }
119
120   ERROR HANDLING
121       See the ERROR HANDLING section of Business::PayPal::API for information
122       on handling errors.
123
124   EXPORT
125       None by default.
126

SEE ALSO

128       <https://developer.paypal.com/en_US/pdf/PP_APIReference.pdf>
129

AUTHORS

131       ·   Scott Wiersdorf <scott@perlcode.org>
132
133       ·   Danny Hembree <danny@dynamical.org>
134
135       ·   Bradley M. Kuhn <bkuhn@ebb.org>
136
138       This software is copyright (c) 2006-2017 by Scott Wiersdorf, Danny
139       Hembree, Bradley M. Kuhn.
140
141       This is free software; you can redistribute it and/or modify it under
142       the same terms as the Perl 5 programming language system itself.
143
144
145
146perl v5.32.0                      2020-B0u7s-i2n8ess::PayPal::API::DirectPayments(3)
Impressum