Search the Community
Showing results for tags 'fix'.
-
I was testing the PayPal Express payment module and encountered some issues when using German language address or names or product names with special characters in it. These encoding issues have been fix by the community but they are spread around in multiple topics so I thought it might be helpful for others to have all fixes in one place. PayPal Account Setting Go to "My Account" -> "Profile" -> "My selling tools" -> "PayPal button language encoding" Then setup Your website's language: Western European Languages (including English) click the "more options" button and set Encoding to UTF-8. Below where it says "Do you want to use the same encoding for data sent from PayPal to you (e.g., IPN, downloadable logs, emails)?" tick the "Yes" checkbox. Click "Save" and logout of your PayPal account. Gergely added nice images that explain it visually how to do it. http://www.oscommerce.com/forums/topic/397700-utf-8-in-payments-standard/?p=1702922 Encoding fix This fix is by courtesy of @@raiwa he gave the key to the solution posted then later by @@HansTatt. Thanks guys! :thumbsup: Inside the ext/modules/payment/paypal/express.php file look for this code $item_params['L_PAYMENTREQUEST_0_NAME' . $line_item_no] = $product['name']; and replace with $item_params['L_PAYMENTREQUEST_0_NAME' . $line_item_no] = utf8_decode($product['name']); then look for this code $params['PAYMENTREQUEST_0_SHIPTONAME'] = $order->delivery['firstname'] . ' ' . $order->delivery['lastname']; $params['PAYMENTREQUEST_0_SHIPTOSTREET'] = $order->delivery['street_address']; $params['PAYMENTREQUEST_0_SHIPTOCITY'] = $order->delivery['city']; $params['PAYMENTREQUEST_0_SHIPTOSTATE'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], $order->delivery['state']); $params['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $order->delivery['country']['iso_code_2']; $params['PAYMENTREQUEST_0_SHIPTOZIP'] = $order->delivery['postcode']; and replace with this $params['PAYMENTREQUEST_0_SHIPTONAME'] = utf8_decode($order->delivery['firstname']) . ' ' . utf8_decode($order->delivery['lastname']); $params['PAYMENTREQUEST_0_SHIPTOSTREET'] = utf8_decode($order->delivery['street_address']); $params['PAYMENTREQUEST_0_SHIPTOCITY'] = utf8_decode($order->delivery['city']); $params['PAYMENTREQUEST_0_SHIPTOSTATE'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], $order->delivery['state']); $params['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $order->delivery['country']['iso_code_2']; $params['PAYMENTREQUEST_0_SHIPTOZIP'] = $order->delivery['postcode']; Reference Topic: http://www.oscommerce.com/forums/topic/397165-paypal-standard-not-emptying-basket/?p=1714514 That's it.
-
Contributions concerned: - Paiment ATOS/SIPS RETOUR AUTO : http://addons.oscommerce.com/info/8253 - ATOS v1.0 : http://addons.oscommerce.com/info/8401 For users of the ATOS / SIPS RETURN AUTO contribution, which encounter a problem of duplicate order after payment, I propose a correction that definitively solves this bug. Here are some important points about the changes to the atos.php file: 1. Changes to the calculation of the decimals of the amount cashed (original is an intermittent error of 1 cent against the shop in relation to the exact amount of the order, this corrects it) 2. Fix duplicate order 3. Change to IP v6 (otherwise error / failure when paying for IP v6 users) In the atos.php file (includes/modules/payment/atos.php), modify/replace the makeRequest function from line 375 as follows: // ---------------------------------------------------------------- // makeRequest() // // Make the request by executing the request external application function makeRequest($amount, $currency) { global $customer_id, $_SERVER, $language; // $amount = sprintf("%03d", $amount * $this->_getCurrencyUnit($currency)); $amount = tep_round($amount,2) * $this->_getCurrencyUnit($currency); $pathfile = $this->_getPathFileName(); $command = MODULE_PAYMENT_ATOS_BIN_REQUEST; $command .= " " . $this->os_info['quote'] . "pathfile=" . $pathfile . $this->os_info['quote']; $command .= " merchant_id=" . MODULE_PAYMENT_ATOS_ID; $command .= " amount=" . $amount; $command .= " currency_code=" . $this->_getCurrencyCode(DEFAULT_CURRENCY); $command .= " language=" . $this->_getLanguageCode($language); //Retour automatique a la boutique apres paiement by brouillard s'embrouille $command .= " data=NO_RESPONSE_PAGE"; $command .= " " . $this->os_info['quote'] . "normal_return_url=" . tep_href_link('atos_response.php', '', 'SSL', false) . $this->os_info['quote']; $command .= " " . $this->os_info['quote'] . "cancel_return_url=" . tep_href_link('atos_response.php', '', 'SSL', false) . $this->os_info['quote']; //Fin Retour automatique a la boutique apres paiement by brouillard s'embrouille // BOF Fix doublon commande // $command .= " " . $this->os_info['quote'] . "automatic_response_url=" . tep_href_link(FILENAME_CHECKOUT_PROCESS, tep_session_name() . '=' . tep_session_id(), 'NONSSL', false) . $this->os_info['quote']; $command .= " " . $this->os_info['quote'] . "automatic_response_url=" . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'NONSSL', false) . $this->os_info['quote']; // EOF Fix doublon commande $command .= " customer_id=" . $customer_id; // IP V6 fix // $command .= " customer_ip_address=" . $_SERVER['REMOTE_ADDR']; $command .= " customer_ip_address=" . substr($_SERVER['REMOTE_ADDR'], 0, 19); if (!@ini_get("safe_mode")) $command .= ' 2>&1'; $sips_result = exec($command); $sips = array(); $sips_values = preg_split ("/!/", $sips_result); $sips['code'] = $sips_values[1]; $sips['error'] = $sips_values[2]; $sips['message'] = $sips_values[3]; $sips['command'] = $command; $sips['output'] = $sips_result; if (!isset($sips['code'])) { $sips['code'] = -1; $sips['error'] = $sips_result; } if ($sips['code'] != 0) { $sips['amount'] = $amount; $sips['lang'] = $lang; $sips['id'] = tep_session_id(); } return $sips; } Obviously, this change preserves the automatic return to the shop. :)
- 2 replies
-
- duplicate order
- atos
-
(and 3 more)
Tagged with: