E-Payment Integrator 2020 C++ Edition

Questions / Feedback?

SetCheckout Method

Call this method to begin the Express Checkout process and fetch a token from PayPal which will encode transaction details.

Syntax

ANSI (Cross Platform)
int SetCheckout();

Unicode (Windows)
INT SetCheckout();
- (void)setCheckout;
#define MID_EXPRESSCHECKOUT_SETCHECKOUT 11

INPAY_EXTERNAL int INPAY_CALL InPay_ExpressCheckout_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method queries PayPal for a ResponseToken and begins the Express Checkout process. This token is used to identify the transaction on the PayPal network.

The following properties are required before calling SetCheckout:

After calling this method, you should check the Ack property to determine whether the request was successful. If so, append the ResponseToken value to the following PayPal URL, and redirect your customer there.

https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=

The customer will sign in and fill out payment details on PayPal's site. Afterwards PayPal will automatically redirect the customer back to the ReturnURL you specified, along with the updated token appended to the URL. This token should be parsed from the URL and set as the Token property. You may then proceed in calling GetCheckoutDetails and CheckoutPayment.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2021 /n software inc. - All rights reserved.
E-Payment Integrator 2020 C++ Edition - Version 20.0 [Build 7941]