Jump to content

Search the Community

Showing results for tags 'worldline'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Help and Support
    • PrestaShop Download
    • PrestaShop Marketplace
  • News and Announcements
    • PrestaShop news and releases
    • PrestaShop Beta
    • PrestaShop Blogs
    • PrestaShop Meetups
  • International community (English)
    • General topics
    • PrestaShop Merchants
    • PrestaShop Developers
    • Taxes, Translations & Laws
    • Community Modules and Themes
  • Forum francophone
    • Discussion générale
    • Aide et support communautaire
    • PrestaShop pour les marchands
    • PrestaShop pour les développeurs
    • Adaptation aux lois Québécoises
    • Modules et thèmes gratuits
    • Modules et thèmes payants
  • Foro en Español
    • Discusión general
    • Soporte de la comunidad y ayuda
    • Comerciantes PrestaShop
    • Desarrolladores PrestaShop
    • Módulos y plantillas gratuitas
  • Forum italiano
    • Forum generale
    • Aiuto e supporto della Community
    • Commercianti PrestaShop
    • Sviluppatori PrestaShop
    • Aspetti legali sull'eCommerce
    • Moduli e template gratuiti
  • Deutsches Forum
    • Generelle Fragen
    • Support und Hilfe aus der Community
    • e-Commerce/Versand-Handel mit Prestashop
    • Prestashop-Entwickler
    • Anpassung an deutsches Recht
    • Kostenlose Module und Templates
    • Generelle Fragen Copy
  • Nederlandstalig forum
    • Algemeen
    • Hulp en ondersteuning, van en voor de community
    • PrestaShop-winkeliers
    • PrestaShop-ontwikkelaars
    • Het aanpassen van PrestaShop
    • Gratis modules en templates
  • Fórum em Português
    • Fórum Geral
    • Ajuda e Suporte da Comunidade
    • Lojistas que utilizam o PrestaShop
    • Desenvolvedores PrestaShop
    • Legislação específica
    • Módulos e temas gratuitos
  • Polskie forum
    • Forum ogólne
    • Wsparcie i pomoc użytkowników
    • Oferty twórców PrestaShop
    • Deweloperzy PrestaShop
    • Darmowe Moduły i Szablony
  • Dansk forum
    • Generelt forum
    • Hjælp og support fra fællesskabet
    • PrestaShop for købmænd
    • PrestaShop for udviklere
    • Love og regler
    • Gratis moduler og temaer
  • České fórum
    • Instalasi, Konfigurasi dan upgrade
    • Obecná diskuze
    • Bezplatné moduly a šablony
    • PrestaShop vývojáři
    • PrestaShop obchodníci
  • Bahasa Indonesia
    • Diskusi Umum
    • Podpora a pomoc komunity
    • Laporan Bug
    • Jasa, Promosi & Lowongan Kerja
  • Svenskt forum
    • Allmän diskussion
    • Installation, konfigurering och uppdatering
  • Forumul românesc
    • Discuţii generale
    • Instalare, configurare şi upgrade
  • Pусский язык
    • Обсуждение скрипта
    • Установка, Настройка, Обновление
    • Прием багов
  • Slovenské fórum
    • Všeobecná diskusia
    • Podpora a pomoc komunity
    • PrestaShop obchodníci
    • PrestaShop vývojári
    • Bezplatné moduly a šablóny
  • Türkçe Topluluğu
    • Genel Konular
    • Topluluk desteği ve yardım
    • PrestaShop Tüccarları
    • Prestashop Geliştiricileri
    • Ücretsiz Modül ve Temalar
  • Diễn đàn tiếng Việt
    • Thảo luận chung
    • Hỗ trợ từ cộng đồng
    • Dành cho chủ doanh nghiệp / cửa hàng
    • Dành cho lập trình viên
  • PrestaShop Communities
    • اللغه العربيه [Arabic]
    • Ελληνικά [Greek]
    • עִבְרִית [Hebrew]
    • 中文
    • Magyar [Hungarian]
    • 日本語 [Japanese]
    • Lietuviškai [Lithuanian]
    • انجمن فارسی [Persian]
    • ไทย [Thai]
    • Malaysia [Malaysian]
    • Eesti [Estonian]
    • Slovenščina [Slovenian]
    • Српски [Serbian]
  • IP. Board Forum
    • IP. Board Forum Questions and Issues
  • Archive
    • Zapłać Moduły i Szablony [ARCHIVE]
    • Moduly, upravy a dizajn [ARCHIVE]
    • Phát triển và các mô-đun [ARCHIVE]
    • Yazılım, Modül ve Tema [ARCHIVE]
    • Модули, Шаблоны [ARCHIVE]
    • Module şi teme [ARCHIVE]
    • Pengembangan dan Modul [ARCHIVE]
    • Moduler och teman [ARCHIVE]
    • Ecommerce x PrestaShop [ARCHIVE BOARD]
    • Vývoj a moduly [ARCHIVE]
    • Kostenpflichtige Module, Templates [ARCHIVE]
    • Módulos y temas pagos [ARCHIVE]
    • Módulos e temas pagos [ARCHIVE]
    • Servizi commerciali [ARCHIVE]
    • Forum - Feedback Contributor
    • PrestaShop Cloud

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. Hello there! I have some trouble these three last days with an addon development. My shop will be able to manage recurring payment (subscription) with SDD and debit card. For this reason I bought 2 addons : Atos Worldline SIPS A subscription addon called pm_subscription. This last module doesn't manage Worldline payment so I need to implement my own payment method in this addon. For this, I have to create a <form> which send to an external Worldline link (a wallet configuration page) the customer, and the seller bank information. The main goal here is to let the customer be redirected on the Worldline link which requests POST information (said before). So I tried to create a <form> on the right .tpl: <form id="enablePayment" action="{url entity='module' name='pm_subscription' controller='redirectPayment'}" method="post"> <input type="hidden" name="subid" value="{$subscriber->id|intval}" /> <input type="submit" value="Configurer le paiement" name="enablePayment" rel="nofollow" class="btn btn-primary" title="Configurer paiement" data-id- subscriber="{$subscriber->id|intval}"/> </form> As you can see, I redirect the action to a front module controller that I created: class pm_subscriptionRedirectPaymentModuleFrontController extends ModuleFrontController { public function postProcess() { // Include payments modules include(_PS_MODULE_DIR_.'pm_subscription'.DIRECTORY_SEPARATOR.'models' .DIRECTORY_SEPARATOR.'payment_modules'.DIRECTORY_SEPARATOR.'SubPaymentModuleWorldline.php'); include(_PS_MODULE_DIR_.'pm_subscription'.DIRECTORY_SEPARATOR.'models' .DIRECTORY_SEPARATOR.'payment_modules'.DIRECTORY_SEPARATOR.'SubPaymentModuleSEPA.php'); if (isset($_POST['subid'])) { // @TODO vérifier subid $subid = pSQL($_POST['subid']); // Récupérer méthode de paiement choisie $row = self::getMethod($subid); if ($row['payment_identifier'] == "worldline") { // CB SubPaymentModuleWorldline::addCardWallet(); } elseif ($row['payment_identifier'] == "sdd") { // SEPA echo 'SEPA Direct Debit!'; } else { echo "oopsi! " .var_dump($row); // @TODO gérer } //... Here is the addCardWallet() function: public function addCardWallet($isTest = true) { $worldline = new Worldline(); // Define the page to redirect after payment $protocol = Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://'; $return_page = $protocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__; $return_page .= 'subscriptions/main?return=worldline'; // @TODO optimize URL $atos_mode = true;//stub $version_key = $worldline->getVersionKey($atos_mode); $merchant_id = ''; // If we are in production mode $atos_mode ? $merchant_id = Configuration::get('ATOS_MERCHANT_ID') : $merchant_id = '002001000000001'; // Data we need to send // @TODO dynamic merchant wallet Id $param = 'merchantId='.$merchant_id.'|normalReturnUrl='.$return_page; $param .= '|keyVersion='.$version_key.'|merchantWalletId=14702'; $param .= '|paymentMeanBrandList=CB,VISA,MASTERCARD'; $param .= '|requestDateTime='.date("Y-m-d H:i:s"); // Request secure $secret_key = worldline::getSecretKey($atos_mode); $data = utf8_encode($param); $seal = hash('sha256', $data.$secret_key); $connector_url = 'https://payment-webinit-sogenactif.test.sips-atos.com/walletManagementInit'; /* POST Request without form */ // data part $content = http_build_query(array( 'Data' => $param, 'InterfaceVersion' => 'HP_2.9', 'Seal' => $seal )); // protocol part $context = stream_context_create(array( 'http' => array( 'method' => 'POST', 'header' => 'Content-Type: application/x-www-form-urlencoded', 'content' => $content ) )); return file_get_contents($connector_url, null, $context); } This function create a POST request and send it to the Worldline wallet page. The problem is that this method doesn't work. Because my front module controller needs to return a template page! I think I didn't understand how to resolve cleanly my need. I considere myself good at PHP but need to learn more how to use correctly the Prestashop CMS. Could you please help me for that? Thank you. Tend0
×
×
  • Create New...