簡體   English   中英

Prestashop 1.7付款模塊

[英]Prestashop 1.7 Payment module

我正在為prestashop 1.7創建信用卡支付模塊

如果交易成功或失敗,我不知道如何在外部網址上發送帖子值並接收其響應。

你必須做這樣的事情:

  • 制作一個模塊( https://validator.prestashop.com/generator )並使用PaymentModule擴展它,而不僅僅是Module。
  • 注冊有趣的鈎子( http://build.prestashop.com/news/module-development-changes-in-17/ ),然后在您的模塊中創建如下函數:

      public function hookHookName($params) { // Do things here } 
  • 專門使用此掛鈎(第一部分是掛鈎名稱,第二部分是$ params):

     Hook::exec('actionValidateOrder', array( 'cart' => $this->context->cart, 'order' => $order, 'customer' => $this->context->customer, 'currency' => $this->context->currency, 'orderStatus' => $order_status )); 
  • 在驗證任何內容之前,先撥打電話(例如,curl / file_get_contents)。
  • 知道如何做的一個好方法是下載Paypal模塊(它是免費的)並查看他們是如何做到的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM