$error++; $errors = $interface->errors; } // Fin appel triggers // Send an email if (!empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) { $sendto = $conf->global->PAYPAL_PAYONLINE_SENDEMAIL; $from = $conf->global->MAILING_EMAIL_FROM; // Define $urlwithroot $urlwithouturlroot = preg_replace('/' . preg_quote(DOL_URL_ROOT, '/') . '$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot . DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current $urlback = $_SERVER["REQUEST_URI"]; $topic = '[' . $conf->global->MAIN_APPLICATION_TITLE . '] ' . $langs->transnoentitiesnoconv("NewPaypalPaymentReceived"); $tmptag = dolExplodeIntoArray($fulltag, '.', '='); $content = ""; if (!empty($tmptag['MEM'])) { $langs->load("members"); $url = $urlwithroot . "/adherents/card_subscriptions.php?rowid=" . $tmptag['MEM']; $content .= $langs->trans("PaymentSubscription") . "<br>\n"; $content .= $langs->trans("MemberId") . ': ' . $tmptag['MEM'] . "<br>\n"; $content .= $langs->trans("Link") . ': <a href="' . $url . '">' . $url . '</a>' . "<br>\n"; } else { $content .= $langs->transnoentitiesnoconv("NewPaypalPaymentReceived") . "<br>\n"; } $content .= "<br>\n"; $content .= $langs->transnoentitiesnoconv("TechnicalInformation") . ":<br>\n"; $content .= $langs->transnoentitiesnoconv("ReturnURLAfterPayment") . ': ' . $urlback . "<br>\n"; $content .= "tag=" . $fulltag . " token=" . $token . " paymentType=" . $paymentType . " currencycodeType=" . $currencyCodeType . " payerId=" . $payerID . " ipaddress=" . $ipaddress . " FinalPaymentAmt=" . $FinalPaymentAmt; $ishtml = dol_textishtml($content);
/** * testDolExplodeIntoArray * * @return void */ public function testDolExplodeIntoArray() { $stringtoexplode = 'AA=B/B.CC=.EE=FF.HH=GG;.'; $tmp = dolExplodeIntoArray($stringtoexplode, '.', '='); print __METHOD__ . " tmp=" . json_encode($tmp) . "\n"; $this->assertEquals('{"AA":"B\\/B","CC":"","EE":"FF","HH":"GG;"}', json_encode($tmp)); }