1Business::PayPal::API::UEsxeprreCsosnCthreicbkuotuetdB(u3Ps)eirnlesDso:c:uPmaeynPtaalt:i:oAnPI::ExpressCheckout(3)
2
3
4

NAME

6       Business::PayPal::API::ExpressCheckout - PayPal Express Checkout API
7

VERSION

9       version 0.77
10

SYNOPSIS

12         use Business::PayPal::API::ExpressCheckout;
13
14         ## see Business::PayPal::API documentation for parameters
15         my $pp = Business::PayPal::API::ExpressCheckout->new( ... );
16
17         my %resp = $pp->SetExpressCheckout
18                      ( OrderTotal => '55.43',   ## defaults to USD
19                        ReturnURL  => 'http://site.tld/return.html',
20                        CancelURL  => 'http://site.tld/cancellation.html', );
21
22         ... time passes, buyer validates the token with PayPal ...
23
24         my %details = $pp->GetExpressCheckoutDetails($resp{Token});
25
26         ## now ask PayPal to xfer the money
27         my %payinfo = $pp->DoExpressCheckoutPayment( Token => $details{Token},
28                                                      PaymentAction => 'Sale',
29                                                      PayerID => $details{PayerID},
30                                                      OrderTotal => '55.43' );
31

DESCRIPTION

33       Business::PayPal::API::ExpressCheckout implements PayPal's Express
34       Checkout API using SOAP::Lite to make direct API calls to PayPal's SOAP
35       API server. It also implements support for testing via PayPal's
36       sandbox. Please see Business::PayPal::API for details on using the
37       PayPal sandbox.
38
39   SetExpressCheckout
40       Implements PayPal's "Website Payment Pro" SetExpressCheckout API call.
41       Supported parameters include:
42
43         Token
44         OrderTotal
45         currencyID
46         MaxAmount
47         OrderDescription
48         Custom
49         InvoiceID
50         ReturnURL
51         CancelURL
52         Address
53         ReqConfirmShipping
54         NoShipping
55         AddressOverride
56         LocaleCode
57         PageStyle
58         'cpp-header-image'
59         'cpp-header-border-color'
60         'cpp-header-back-color'
61         'cpp-payflow-color'
62         PaymentAction
63         BuyerEmail
64         BillingType
65         BillingAgreementDescription
66         PaymentType
67         BillingAgreementCustom
68
69       as described in the PayPal "Web Services API Reference" document. The
70       default currency setting is 'USD' if not otherwise specified.
71
72       Returns a hash containing a 'Token' key, whose value represents the
73       PayPal transaction token.
74
75       Required fields:
76
77         OrderTotal, ReturnURL, CancelURL.
78
79           my %resp = $pp->SetExpressCheckout();
80           my $token = $resp{Token};
81
82       Example (courtesy Ollie Ready):
83
84         my $address = {
85               Name            =>      'Some Customer',
86               Street1         =>      '888 Test St.',
87               Street2         =>      'Suite 9',
88               CityName        =>      'San Diego',
89               StateOrProvince =>      'CA',
90               PostalCode      =>      '92111',
91               Country         =>      'US',
92               Phone           =>      '123-123-1234',
93         };
94
95         my %response = $pp->SetExpressCheckout(
96               OrderTotal      =>      '11.01',
97               ReturnURL       =>      '<![CDATA[http://example.com/p?cmd=checkout]]>',
98               CancelURL       =>      'http://example.com',
99               PaymentAction   =>      'Authorization',
100               AddressOverride =>      1,
101               Address         =>      $address,
102         );
103
104   GetExpressCheckoutDetails
105       Implements PayPal's WPP SetExpressCheckout API call. Supported
106       parameters include:
107
108         Token
109
110       as described in the PayPal "Web Services API Reference" document. This
111       is the same token you received from SetExpressCheckout.
112
113       Returns a hash with the following keys:
114
115         Token
116         Custom
117         InvoiceID
118         ContactPhone
119         Payer
120         PayerID
121         PayerStatus
122         FirstName
123         LastName
124         PayerBusiness
125         AddressStatus
126         Name
127         Street1
128         Street2
129         CityName
130         StateOrProvince
131         PostalCode
132         Country
133
134       Required fields:
135
136         Token
137
138   DoExpressCheckoutPayment
139       Implements PayPal's WPP SetExpressCheckout API call. Supported
140       parameters include:
141
142         Token
143         PaymentAction (defaults to 'Sale' if not supplied)
144         PayerID
145         currencyID (defaults to 'USD' if not supplied)
146
147         OrderTotal
148         OrderDescription
149         ItemTotal
150         ShippingTotal
151         HandlingTotal
152         TaxTotal
153         Custom
154         InvoiceID
155         ButtonSource
156         NotifyURL
157
158         ST_Name
159         ST_Street1
160         ST_Street2
161         ST_CityName
162         ST_StateOrProvince
163         ST_Country
164         ST_PostalCode
165
166         PDI_Name
167         PDI_Amount
168         PDI_Number
169         PDI_Quantity
170         PDI_Tax
171
172       as described in the PayPal "Web Services API Reference" document.
173
174       Returns a hash with the following keys:
175
176         Token
177         TransactionID
178         TransactionType
179         PaymentType
180         PaymentDate
181         GrossAmount
182         FeeAmount
183         SettleAmount
184         TaxAmount
185         ExchangeRate
186         PaymentStatus
187         PendingReason
188         BillingAgreementID (if BillingType 'MerchantInitiatedBilling'
189                             was specified during SetExpressCheckout)
190
191       Required fields:
192
193         Token, PayerID, OrderTotal
194
195   ERROR HANDLING
196       See the ERROR HANDLING section of Business::PayPal::API for information
197       on handling errors.
198

EXAMPLES

200       Andy Spiegl <paypalcheckout.Spiegl@kascada.com> has kindly donated some
201       example code (in German) which may be found in the eg directory of this
202       archive. Additional code examples may be found in the t test directory.
203
204   EXPORT
205       None by default.
206

SEE ALSO

208       SOAP::Lite, Business::PayPal::API,
209       <https://www.paypal.com/IntegrationCenter/ic_expresscheckout.html>,
210       <https://developer.paypal.com/en_US/pdf/PP_APIReference.pdf>
211

AUTHORS

213       •   Scott Wiersdorf <scott@perlcode.org>
214
215       •   Danny Hembree <danny@dynamical.org>
216
217       •   Bradley M. Kuhn <bkuhn@ebb.org>
218
220       This software is copyright (c) 2006-2017 by Scott Wiersdorf, Danny
221       Hembree, Bradley M. Kuhn.
222
223       This is free software; you can redistribute it and/or modify it under
224       the same terms as the Perl 5 programming language system itself.
225
226
227
228perl v5.34.0                      2021B-u0s7i-n2e2ss::PayPal::API::ExpressCheckout(3)
Impressum