MackStores.Com Posted November 3, 2017 Share Posted November 3, 2017 Well we had a lot of problem with paypal module for 1.7 as there was no ways to put an api credentials. Browsed the forums and people are suffering the same going round and round between paypal website and our own SO we did some tweaks to make it work for us 1) in the Module->paypal->views->templates->admin folder there is a file called configuration.tpl in this we added this following code in the end. {*added by mackstores.com*} <div style="width:50%" class="panel"> <form action={$form_url_mss|escape:'html'} method="post"> Api User Name <input type="text" name="user_name_ms" value="{$api_user_name_live}" /><br> Api Signature <input type="text" name="signature_ms" value="{$api_signature_live}" /><br> Api password<input type="text" name="pass_ms" value="{$api_password_live}" /><br> <input type="submit" name="Pay_pal_cred_mod_mackstores" value="{l s='Update' mod='paypal'}" class="button"/></td> </form> </div> {*added by mackstores.com*} 2.) in module folder we opened paypal.php in the ( private function _postProcess() ) function added the following code if (Tools::isSubmit('Pay_pal_cred_mod_mackstores')) //added by mackstores.com { Configuration::updateValue('PAYPAL_USERNAME_LIVE', Tools::getValue('user_name_ms')); Configuration::updateValue('PAYPAL_PSWD_LIVE', Tools::getValue('signature_ms')); Configuration::updateValue('PAYPAL_SIGNATURE_LIVE', Tools::getValue('pass_ms')); Configuration::updateValue('PAYPAL_LIVE_ACCESS', 1); } 3. Again in the paypal.php under (( public function getContent() )) we added (note the remarked lines // are added) $this->context->smarty->assign(array( 'path' => $this->_path, 'country' => Country::getNameById($this->context->language->id, $this->context->country->id), 'localization' => $this->context->link->getAdminLink('AdminLocalization', true), 'preference' => $this->context->link->getAdminLink('AdminPreferences', true), 'active_products' => $this->express_checkout, 'return_url' => $return_url, 'paypal_card' => Configuration::get('PAYPAL_API_CARD'), 'api_user_name_sandbox' => Configuration::get('PAYPAL_USERNAME_SANDBOX'), 'api_user_name_live' => Configuration::get('PAYPAL_USERNAME_LIVE'),//added by mackstores.com 'api_signature_live' => Configuration::get('PAYPAL_SIGNATURE_LIVE'),//added by mackstores.com 'api_password_live' => Configuration::get('PAYPAL_PSWD_LIVE'),//added by mackstores.com 'form_url_mss' => $_SERVER['REQUEST_URI'],//added by mackstores.com 'ec_card_active' => $ec_card_active, 'ec_paypal_active' => $ec_paypal_active, 'need_rounding' => Configuration::get('PS_ROUND_TYPE') == Order::ROUND_ITEM ? 0 : 1, )); Now we have put the api params and it works fine but still the error reporting on return to the customer is bad. suppose a customer has less balance and it comes back to the website and says unexpected error clearly they released the ps 1.7 with being on mercy on paid modules Hope this post helps lots of stuck people 1 Link to comment Share on other sites More sharing options...
TC!! Posted November 3, 2017 Share Posted November 3, 2017 Thanks, really useful. Link to comment Share on other sites More sharing options...
stefano11 Posted January 10, 2018 Share Posted January 10, 2018 Hi,@MackStores.Com with your custom code I can insert the api, but when I try a order, paypal returns error 10002. Solution? The credential (user api, pwd api and signature) are ok. Link to comment Share on other sites More sharing options...
MackStores.Com Posted March 8, 2018 Author Share Posted March 8, 2018 On 1/10/2018 at 9:58 PM, stefano11 said: Hi,@MackStores.Com with your custom code I can insert the api, but when I try a order, paypal returns error 10002. Solution? The credential (user api, pwd api and signature) are ok. well check if the country is right and update to the latest version of the module Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now