Jump to content


  • Posts

  • Joined

  • Last visited

Guillaume's Achievements


Rookie (2/14)

  • Conversation Starter Rare
  • First Post Rare
  • Collaborator Rare
  • Week One Done Rare
  • One Month Later Rare

Recent Badges



  1. Thanks that was very helpful! The error log showed several similar notices and warning (benign, as you said) and one exception regarding a call which is made to Parcel2Go. Deactivating the Parcel2Go module, everything now works normally. I am copying the Parcel2Go error below. It might be that everything failed because we backed up recently and there were no setting filled in in that module, although it was activated. Thanks a lot again! [<strong>Exception</strong>] /home/clients/730d21bd55854ec4d0c02aa159bd4077/sites/www.temp-alerte.com/modules/shipping/Parcel2Go/shipping.class.php:25 - SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://v3.api.parcel2go.com/ParcelService.asmx?WSDL' : failed to load external entity "https://v3.api.parcel2go.com/ParcelService.asmx?WSDL" https://www.temp-alerte.com/index.php?_a=confirm
  2. Thanks for the prompt answer. Here we go: The only update I have made to the SMARTY template is in admin/index.inc.php, I have the following: $GLOBALS['smarty']->assign('STORE_URL', CC_STORE_URL); I am not sure where the System Error Log is displayed? Is that in the admin panel? I didn't find the error log you are referring to Regarding the PHP error log, I followed the procedure you mentioned on the forum linked you posted. And I got the enclosed error log. What really puzzles me is that the error seems to be referring to functions and variables which are core Cubecart and which (to my knowledge) I have not touched Any thoughts? error_log
  3. Hi, I know I should probably give more details, but I don't know exactly where to start the investigation. For a reason which I ignore, I am getting a blank page on index.php?_a=checkout (when trying to proceed with the cart recap right before payment page) and on index.php?_a=confirm (when trying to add an item to the basket). I believe it's solely a php issue (nothing coming from the back-end), as I can still proceed with payment by anually changing the URL to index.php?_a=gateway. After payment I am redirected to index.php?_a=complete and can see the order summary - no problem. I tried doing a back-up of my Cubecart folder to a date where things worked ok, but it didn't help. Maybe I did it wrong though... I usually get this blank page whenever my code has a syntax error. I'd like to be able to check the file which drives these index.php pages. The file index.php looks absolutely ok and hasn't been touched for a while. Any hint as of where I could start investigating from would be very welcome! Guillaume
  4. Sorry, I should have tried this before asking. What you describes worked perfectly indeed!
  5. Cheers, I used the following in admin/index.inc.php: $GLOBALS['smarty']->assign('STORE_URL', CC_STORE_URL); And was eventually able to re-use it in skin/admin/index.tpl. For a reason I did not understand, I was not able to assign other variables. But I didn't investigate that much, as I have enough with $STORE_URL and $VAL_SELF
  6. Hi, On the payment gateway I am developping, I am trying to define cool default values for the admin, so that they need to configurate only the very minimum. In particular, for the return URL, I'd like to set a default value equal to $GLOBALS['storeURL'] . '/modules/gateway/MyGateway/return.php' But how can I access such a global variable from index.tpl? I have seen a couple of global variables being called in index.tpl, e.g. $VAL_SELF, $SESSION_TOKEN, etc. but the naming did not seem to match what is used in php. Appreciate any help! Best regards, Guillaume
  7. Hi, In my payment gateway, for safety reasons, I would like to check the form's signature (to ensure the response is genuinely from the payment provider). For that purpose, I need to use a couple of settings which are input by the admin of the module's settings page, namely: the certificate, the mode (test or prod) and the encryption algorithm). But while a simple $mode=$this->_module['mode'] works perfectly in fixedVariables() function, it stays empty when called in call() function. I have tried the below, but with no luck: $this->_module = $GLOBALS['config']->get($module); Is there any reason why I need to specifically call the module's settings differently in that function? Best regards, Guillaume
  8. In some payment gateways, the function call() seem to be used to process the payment, while in some others it seems to be the function process(). Looking at cubecart.class.php, I found the following (rom line 278 onwards): if (file_exists($class_file)) { include $class_file; $gateway = new Gateway($GLOBALS['config']->get($module)); $command = (isset($_GET['cmd'])) ? strtolower($_GET['cmd']) : null; if (!empty($command)) { # if (method_exists($gateway, $command)) $gateway->{$command}(); switch ($_GET['cmd']) { case 'call': if (method_exists($gateway, 'call')) { $gateway->call(); } exit; break; case 'process': if (method_exists($gateway, 'process')) { $gateway->process(); } break; } } } My interpretation of this is that there is a variable $_GET['cmd'] depending on which either the function process() is used, or the function call(). However, I couldn't find much information about this variable, studying the code. I would apprecate if anyone could enlight me on what exactly it does, as this would make my understanding clearer of when exactly each of these functions are called. What I am especially after is, when exactly each of these functions are called. Is call() used when the payment providers gets back to the merchant? And process() used when the payment has been accepted (i.e. independently of the user closing the window)? What puzzles me is that this piece of code is in a function loadpage(), which implies that it is tighted to the UI experience. Best regards, Guillaume
  9. Thanks. That would make my plugin somewhat dependant on the plugin "Additional Product Fields", but this is an interesting idea, I'll give it a try!
  10. Thanks. I haven't yet come to a solution which gives me full satisfaction. Nevertheless, the below comes in handy: #URL encoding of all values except email and URL foreach ($hidden as $key => $val){ if ($key != "vads_cust_email" and substr($key, 0, 8) != "vads_url") $hidden[$key] = urlencode($val); } In other words, I encode with urlencode all the values of the form, except URLs and emails.
  11. I hqve solved this one a long time ago, so for anyone interested, here below is what I have done: #Calculation of several currency characteristics $currencyCode = $GLOBALS['tax']->_currency_vars['code']; #Numeric currency calculation $currency_records = $GLOBALS['db']->select('CubeCart_currency','iso',array('code' => $currencyCode)); if ($currency_records !== false) $numericalCurrency = $currency_records[0]['iso']; #Exchange rate calculation $currency_records = $GLOBALS['db']->select('CubeCart_currency','value',array('code' => $currencyCode)); if ($currency_records !== false) $exchange_rate = $currency_records[0]['value']; #Decimals calculation $currency_records = $GLOBALS['db']->select('CubeCart_currency','decimal_places',array('code' => $currencyCode)); if ($currency_records !== false) $decimal_places = intval($currency_records[0]['decimal_places']); Retrieving the decimal places is important as pmost payment gateways do not use the dot or comma sign and expect an amount of USD 12.45 to be sent as "1245" (hence it is important to know how many decimals the currency has).
  12. Cheers, I retrieve the config version and uid with the below code - works perfectly indeed: $configxml = simplexml_load_file(__DIR__ . "/config.xml"); $module_version = $configxml->info->version; $module_uid = $configxml->info->uid;
  13. I'd very happily do this. I could even use the selected shipping product, without the need to iterate. But would we have this "3" or "5" value in a parameter? Or are you saying that this would be a prospective development for Cubecart?
  14. I could do what you recommend for shipping_type indeed. For shipping_speed and shipping_delay, I belive I do not really want to have anything specific to a given shipping company, in the payment gateway. I believe an interesting improvement in Cubecart would be either: to allow, for a given payment gateway a setting (say: shipping_speed) which could be instantiated on each and every shipping product or to allow defining such standard settings (shipping_speed, shipping_delay, etc. but not sure everyone needs the same as I do, maybe expected_delivery_datetime would sound better) so that the shipping module could fill it in and the payment gateway module could read it
  15. I have actually just tried applying the url_encode function to the address containing the quote, and the payment provider system seems to be happy because the payment goes through. Next, I will url_encode all the variables in the array. Now one thing I am wondering is that if I send either of those, it works: $signature = hash_hmac('sha256', $concatenated_string, $certificate, true); $signature = hash_hmac('sha256', $concatenated_string, $certificate, false); $signature = base64_encode(hash_hmac('sha256', $concatenated_string, $certificate, true));
  • Create New...