|
1 | 1 | <?php |
2 | 2 |
|
3 | | -require_once("paypalfunctions.php"); |
4 | | -// ================================== |
5 | | -// PayPal Express Checkout Module |
6 | | -// ================================== |
7 | | - |
8 | | -//'------------------------------------ |
9 | | -//' The paymentAmount is the total value of |
10 | | -//' the shopping cart, that was set |
11 | | -//' earlier in a session variable |
12 | | -//' by the shopping cart page |
13 | | -//'------------------------------------ |
| 3 | +require_once 'paypalfunctions.php'; |
| 4 | +/** |
| 5 | + * PayPal Express Checkout Module |
| 6 | + * |
| 7 | + * The paymentAmount is the total value of |
| 8 | + * the shopping cart, that was set |
| 9 | + * earlier in a session variable |
| 10 | + * by the shopping cart page |
| 11 | + */ |
14 | 12 | $paymentAmount = $_SESSION["Payment_Amount"]; |
15 | 13 |
|
16 | | -//'------------------------------------ |
17 | | -//' The currencyCodeType and paymentType |
18 | | -//' are set to the selections made on the Integration Assistant |
19 | | -//'------------------------------------ |
| 14 | +/** |
| 15 | + * The currencyCodeType and paymentType |
| 16 | + * are set to the selections made on the Integration Assistant |
| 17 | + */ |
20 | 18 | $currencyCodeType = "EUR"; |
21 | 19 | $paymentType = "Sale"; |
22 | 20 |
|
23 | | -//'------------------------------------ |
24 | | -//' The returnURL is the location where buyers return to when a |
25 | | -//' payment has been succesfully authorized. |
26 | | -//' |
27 | | -//' This is set to the value entered on the Integration Assistant |
28 | | -//'------------------------------------ |
| 21 | +/** |
| 22 | + * The returnURL is the location where buyers return to when a |
| 23 | + * payment has been succesfully authorized. |
| 24 | + * This is set to the value entered on the Integration Assistant |
| 25 | + */ |
29 | 26 | $returnURL = "http://www.nosolored.me/pluging/paypal/confirm.php"; |
30 | 27 |
|
31 | | -//'------------------------------------ |
32 | | -//' The cancelURL is the location buyers are sent to when they hit the |
33 | | -//' cancel button during authorization of payment during the PayPal flow |
34 | | -//' |
35 | | -//' This is set to the value entered on the Integration Assistant |
36 | | -//'------------------------------------ |
| 28 | + |
| 29 | +/** |
| 30 | + * The cancelURL is the location buyers are sent to when they hit the |
| 31 | + * cancel button during authorization of payment during the PayPal flow |
| 32 | + * |
| 33 | + * This is set to the value entered on the Integration Assistant |
| 34 | + */ |
37 | 35 | $cancelURL = "http://www.nosolored.me/pluging/paypal/error.php"; |
38 | 36 |
|
39 | | -//'------------------------------------ |
40 | | -//' Calls the SetExpressCheckout API call |
41 | | -//' |
42 | | -//' The CallShortcutExpressCheckout function is defined in the file PayPalFunctions.php, |
43 | | -//' it is included at the top of this file. |
44 | | -//'------------------------------------------------- |
| 37 | +/** |
| 38 | + * Calls the SetExpressCheckout API call |
| 39 | + * The CallShortcutExpressCheckout function is defined in the file PayPalFunctions.php, |
| 40 | + * it is included at the top of this file. |
| 41 | + */ |
45 | 42 | $resArray = CallShortcutExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL); |
46 | 43 | $ack = strtoupper($resArray["ACK"]); |
47 | 44 | if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { |
|
0 commit comments