vanina200988 0 Posted August 6, 2015 Report Share Posted August 6, 2015 Подскажите если модуль оплаты Yandex для физ лиц ? то есть где вписываешь номер кошелька и клиенты оплачивают. Как модуль в Vamshp1 Link to post Share on other sites
support 446 Posted August 6, 2015 Report Share Posted August 6, 2015 (edited) Возьмите любой стандартный модуль и сделайте из него яндекс.деньги. Например модул MoneyOrderCheck. В Админке переименуйте его в Яндекс деньги. А в /app/Plugin/Payment/Controller/MoneyOrderCheckController.php поменяйте: $content = ' <form action="' . BASE . '/orders/place_order/" method="post"> <button class="btn btn-default" type="submit" value="{lang}Confirm Order{/lang}"><i class="fa fa-check"></i> {lang}Confirm Order{/lang}</button> </form>'; на что-то типа: $order = $this->Order->read(null,$_SESSION['Customer']['order_id']); $content = 'Для оплаты заказа переведите ' .$order['Order']['total']. ' руб. на наш кошелёк 4110000'; <form action="' . BASE . '/orders/place_order/" method="post"> <button class="btn btn-default" type="submit" value="{lang}Confirm Order{/lang}"><i class="fa fa-check"></i> {lang}Confirm Order{/lang}</button> </form>'; order.php Edited August 6, 2015 by VaM Link to post Share on other sites
vanina200988 0 Posted August 6, 2015 Author Report Share Posted August 6, 2015 как сделать на примере вебмани Link to post Share on other sites
support 446 Posted August 6, 2015 Report Share Posted August 6, 2015 Webmoney перхеодит на сайт платёжной системы. Вам же этого не надо, тогда берите за основу например GoolgleHtml, StorePickup, Creditcard, они без перехода на сайт платёжной системы. Link to post Share on other sites
vanina200988 0 Posted August 6, 2015 Author Report Share Posted August 6, 2015 Хорошо спасибо попробую Link to post Share on other sites
support 446 Posted August 6, 2015 Report Share Posted August 6, 2015 Удачи Link to post Share on other sites
vanina200988 0 Posted August 6, 2015 Author Report Share Posted August 6, 2015 как только не пытался ни как не получается настроить Link to post Share on other sites
support 446 Posted August 7, 2015 Report Share Posted August 7, 2015 Покажите код, что именно и куда Вы вставляли. Link to post Share on other sites
vanina200988 0 Posted August 7, 2015 Author Report Share Posted August 7, 2015 было <?php /* ----------------------------------------------------------------------------------------- VamShop - http://vamshop.com ----------------------------------------------------------------------------------------- Copyright (c) 2014 VamSoft Ltd. License - http://vamshop.com/license.html ---------------------------------------------------------------------------------------*/App::uses('PaymentAppController', 'Payment.Controller'); class StorePickupController extends PaymentAppController { public $uses = array('PaymentMethod', 'Order'); public $module_name = 'StorePickup'; public $icon = 'pickup.png'; public function settings () { } public function install() { $new_module = array(); $new_module['PaymentMethod']['active'] = '1'; $new_module['PaymentMethod']['default'] = '0'; $new_module['PaymentMethod']['name'] = Inflector::humanize($this->module_name); $new_module['PaymentMethod']['icon'] = $this->icon; $new_module['PaymentMethod']['alias'] = $this->module_name; $this->PaymentMethod->saveAll($new_module); $this->Session->setFlash(__('Module Installed')); $this->redirect('/payment_methods/admin/'); } public function uninstall() { $module_id = $this->PaymentMethod->findByAlias($this->module_name); $this->PaymentMethod->delete($module_id['PaymentMethod']['id'], true); $this->Session->setFlash(__('Module Uninstalled')); $this->redirect('/payment_methods/admin/'); } public function before_process () { $content = ' <form action="' . BASE . '/orders/place_order/" method="post"> <button class="btn btn-default" type="submit" value="{lang}Confirm Order{/lang}"><i class="fa fa-check"></i> {lang}Confirm Order{/lang}</button> </form>'; return $content; } public function after_process() { $payment_method = $this->PaymentMethod->find('first', array('conditions' => array('alias' => $this->module_name))); $order_data = $this->Order->find('first', array('conditions' => array('Order.id' => $_SESSION['Customer']['order_id']))); if ($payment_method['PaymentMethod']['order_status_id'] > 0) { $order_data['Order']['order_status_id'] = $payment_method['PaymentMethod']['order_status_id']; $this->Order->save($order_data); } } } ?> стало <?php /* ----------------------------------------------------------------------------------------- VamShop - http://vamshop.com ----------------------------------------------------------------------------------------- Copyright (c) 2014 VamSoft Ltd. License - http://vamshop.com/license.html ---------------------------------------------------------------------------------------*/App::uses('PaymentAppController', 'Payment.Controller'); class StorePickupController extends PaymentAppController { public $uses = array('PaymentMethod', 'Order'); public $module_name = 'StorePickup'; public $icon = 'pickup.png'; public function settings () { } public function install() { $new_module = array(); $new_module['PaymentMethod']['active'] = '1'; $new_module['PaymentMethod']['default'] = '0'; $new_module['PaymentMethod']['name'] = Inflector::humanize($this->module_name); $new_module['PaymentMethod']['icon'] = $this->icon; $new_module['PaymentMethod']['alias'] = $this->module_name; $this->PaymentMethod->saveAll($new_module); $this->Session->setFlash(__('Module Installed')); $this->redirect('/payment_methods/admin/'); } public function uninstall() { $module_id = $this->PaymentMethod->findByAlias($this->module_name); $this->PaymentMethod->delete($module_id['PaymentMethod']['id'], true); $this->Session->setFlash(__('Module Uninstalled')); $this->redirect('/payment_methods/admin/'); } public function before_process () { $order = $this->Order->read(null,$_SESSION['Customer']['order_id']); $content = 'Для оплаты заказа переведите ' .$order['Order']['total']. ' руб. на наш кошелёк 4110000'; <form action="' . BASE . '/orders/place_order/" method="post"> <button class="btn btn-default" type="submit" value="{lang}Confirm Order{/lang}"><i class="fa fa-check"></i> {lang}Confirm Order{/lang}</button> </form>'; } public function after_process() { $payment_method = $this->PaymentMethod->find('first', array('conditions' => array('alias' => $this->module_name))); $order_data = $this->Order->find('first', array('conditions' => array('Order.id' => $_SESSION['Customer']['order_id']))); if ($payment_method['PaymentMethod']['order_status_id'] > 0) { $order_data['Order']['order_status_id'] = $payment_method['PaymentMethod']['order_status_id']; $this->Order->save($order_data); } } } ?> Link to post Share on other sites
support 446 Posted August 7, 2015 Report Share Posted August 7, 2015 Попробуйте так: public function before_process () { $order = $this->Order->read(null,$_SESSION['Customer']['order_id']); $content = 'Для оплаты заказа переведите ' .$order['Order']['total']. ' руб. на наш кошелёк 4110000'; $content .= '<form action="' . BASE . '/orders/place_order/" method="post"> <button class="btn btn-default" type="submit" value="{lang}Confirm Order{/lang}"><i class="fa fa-check"></i> {lang}Confirm Order{/lang}</button> </form>'; } Link to post Share on other sites
vanina200988 0 Posted August 8, 2015 Author Report Share Posted August 8, 2015 нет не работает нет кнопки потвердить заказ Link to post Share on other sites
support 446 Posted August 8, 2015 Report Share Posted August 8, 2015 (edited) А так: public function before_process () { $order = $this->Order->read(null,$_SESSION['Customer']['order_id']); $content = 'Для оплаты заказа переведите ' .$order['Order']['total']. ' руб. на наш кошелёк 4110000'; $content .= '<form action="' . BASE . '/orders/place_order/" method="post"> <button class="btn btn-default" type="submit" value="{lang}Confirm Order{/lang}"><i class="fa fa-check"></i> {lang}Confirm Order{/lang}</button> </form>'; return $content; } Всё есть, проверил. Edited August 8, 2015 by VaM Link to post Share on other sites
vanina200988 0 Posted August 8, 2015 Author Report Share Posted August 8, 2015 спасибо терерь точно все работает Link to post Share on other sites
vanina200988 0 Posted August 8, 2015 Author Report Share Posted August 8, 2015 а как для этого модуля назвать фаил иконки картинки просто там нет под модуль картинки Link to post Share on other sites
support 446 Posted August 8, 2015 Report Share Posted August 8, 2015 Возьмите другой модуль, где есть иконка. Link to post Share on other sites
vanina200988 0 Posted August 8, 2015 Author Report Share Posted August 8, 2015 спасибо Link to post Share on other sites
support 446 Posted August 9, 2015 Report Share Posted August 9, 2015 Не за что Link to post Share on other sites
vanina200988 0 Posted August 31, 2015 Author Report Share Posted August 31, 2015 (edited) Подскажите Пожалуйста как изменить или создать модуль оплаты яндекс деньги? В яндекс деньгах есть функция создать кнопку для оплаты, так вот в этом коде <iframe frameborder="0" allowtransparency="true" scrolling="no" src="https://money.yandex.ru/embed/shop.xml?account=41001313137357&quickpay=shop&payment-type-choice=on&writer=seller&targets=Smok-Elektro.ru&default-sum=&button-text=01&successURL=smok-elektro.ru" width="450" height="196"></iframe> есть ссылка на оплату. Как внедрить или создать модуль оплаты яндекс для физ лиц по переходу по ссылке https://money.yandex.ru/embed/shop.xml?account=41001313137357&quickpay=shop&payment-type-choice=on&writer=seller&targets=Smok-Elektro.ru&default-sum=&button-text=01&successURL=smok-elektro.ru" width="450" height="196"></iframe> это же на примере оплаты робокассы. Робокасса тоже переходишь по ссылке. И чтобы назначение платежа было номер заказа, а сумма автоматически прописывалась Edited August 31, 2015 by vanina200988 Link to post Share on other sites
support 446 Posted September 1, 2015 Report Share Posted September 1, 2015 Правкой кода. Берёте любой стандартный модуль и вставляете его код в него в /app/Plugin/Payment/Controller/ Link to post Share on other sites
vanina200988 0 Posted September 1, 2015 Author Report Share Posted September 1, 2015 Спасибо поробую Link to post Share on other sites
myasnik1985 0 Posted February 14, 2016 Report Share Posted February 14, 2016 Добрый день, для vamshop 1 какой брать файл для редактирования? Link to post Share on other sites
support 446 Posted February 14, 2016 Report Share Posted February 14, 2016 Если вопрос по VamShop 1, создайте тему в соответствующем разделе форума. Link to post Share on other sites
Recommended Posts