As we configured, we need to
make two calls to PayPal: SetMobileCheckout and DoMobileCheckoutPayment.
1. SetMobileCheckout: This call sets the order information with PayPal. We
pass order amount, currency, return and cancel URLs, custom variables, etc.
to this call. A successful call returns a string token that we need to use in all
further calls for this order.
2. In the second step, the customer is redirected to PayPal where she or he will
enter her or his payment information??”credit card details or PayPal account
information.
3. DoMobileCheckoutPayment: This is the call that actually gets the funds to
our PayPal account. Without this call, money will not get to our account!
PayPal provides an SDK that we can use for integration. The PHP SDK comes with
sample code to call PayPal APIs and other useful functionality. You can download it
from http://www.paypal.com/IntegrationCenter/ic_downloads.html. Now, let
us use this SDK and add some of our code to do the integration.
Time for Action: Integrating PayPal Mobile
Checkout with POTR
1. The last step in the POTR order process??”order_step4.inc.php??”saves the
order information to a database table and shows a success message to the
customer.
Pages:
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189