Skip to content
Snippets Groups Projects
Commit caf897cf authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Clean code to help debug pb with payment methods.

parent a9721992
No related branches found
No related tags found
No related merge requests found
......@@ -466,6 +466,7 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType,
if (! empty($desc)) $nvpstr = $nvpstr . "&DESC=" . urlencode($desc); // DESC deprecated by paypal -> PAYMENTREQUEST_n_DESC
$_SESSION["Payment_Amount"] = $paymentAmount;
$_SESSION["currencyCodeType"] = $currencyCodeType;
$_SESSION["PaymentType"] = $paymentType;
......
......@@ -56,7 +56,7 @@ $langs->load("paypal");
* View
*/
dol_syslog("Callback url when a PayBox payment was canceled. query_string=".$_SERVER["QUERY_STRING"]);
dol_syslog("Callback url when a PayBox payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]));
llxHeaderPayBox($langs->trans("PaymentForm"));
......
......@@ -55,7 +55,7 @@ $langs->load("paypal");
* View
*/
dol_syslog("Callback url when a PayBox payment was done. query_string=".$_SERVER["QUERY_STRING"]);
dol_syslog("Callback url when a PayBox payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]));
llxHeaderPayBox($langs->trans("PaymentForm"));
......
......@@ -231,7 +231,10 @@ if (GETPOST("action") == 'dopayment')
dol_syslog("email: $email", LOG_DEBUG);
dol_syslog("desc: $desc", LOG_DEBUG);
$_SESSION["Payment_Amount"]=$PAYPAL_API_PRICE;
dol_syslog("SCRIPT_URI: ".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG); // If defined script uri must match domain of PAYPAL_API_OK and PAYPAL_API_KO
//$_SESSION["PaymentType"]=$PAYPAL_PAYMENT_TYPE;
//$_SESSION["currencyCodeType"]=$PAYPAL_API_DEVISE;
//$_SESSION["Payment_Amount"]=$PAYPAL_API_PRICE;
// A redirect is added if API call successfull
print_paypal_redirect($PAYPAL_API_PRICE,$PAYPAL_API_DEVISE,$PAYPAL_PAYMENT_TYPE,$PAYPAL_API_OK,$PAYPAL_API_KO, $FULLTAG);
......
......@@ -64,7 +64,7 @@ $langs->load("paypal");
* View
*/
dol_syslog("Callback url when a PayPal payment was canceled. query_string=".$_SERVER["QUERY_STRING"]);
dol_syslog("Callback url when a PayPal payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]));
llxHeaderPaypal($langs->trans("PaymentForm"));
......
......@@ -92,7 +92,7 @@ if (empty($PAYPAL_API_SIGNATURE))
* View
*/
dol_syslog("Callback url when a PayPal payment was done. query_string=".$_SERVER["QUERY_STRING"]);
dol_syslog("Callback url when a PayPal payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]));
llxHeaderPaypal($langs->trans("PaymentForm"));
......@@ -122,6 +122,7 @@ if ($PAYPALTOKEN)
// From env
$ipaddress = $_SESSION['ipaddress'];
dol_syslog("Call newpaymentok with token=".$token." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag);
if (! empty($paymentType))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment