Giter VIP home page Giter VIP logo

ecpayaio_php's People

Contributors

adelachang0418 avatar allennchang avatar erictseng618 avatar trylovetom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecpayaio_php's Issues

Fatal error in PHP 7.4

PHP Version: PHP 7.4

Example Code:

<?php

require __DIR__ . '/ECPayAIO_PHP/AioSDK/sdk/ECPay.Payment.Integration.php'; 

Error Message:

PHP Fatal error:  Class ECPay_GooglePay contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (ECPay_Verification::check_goods, ECPay_Verification::check_extend_string) in /tmp/ECPayAIO_PHP/AioSDK/sdk/ECPay.Payment.Integration.php on line 1578

Fatal error: Class ECPay_GooglePay contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (ECPay_Verification::check_goods, ECPay_Verification::check_extend_string) in /tmp/ECPayAIO_PHP/AioSDK/sdk/ECPay.Payment.Integration.php on line 1578

Method call uses 4 parameters, but method signature uses 3 parameters

ECPay.Logistics.Integration.php

737 $this->ValidatePhoneNumber('ReceiverPhone', $this->PostParams['ReceiverPhone'], 20, true);
738 $this->ValidatePhoneNumber('ReceiverCellPhone', $this->PostParams['ReceiverCellPhone'], 20, true);

Method call uses 4 parameters, but method signature uses 3 parameters.

你們的效率都那麼差嗎?

2016/12/9 的 pull requests #2 沒鳥我,打電話反應還是一樣

2017/6/12 才更新萊爾富不支援問題

都 pull request了,改一下很困難嗎?
誇張!

AIO PHP 建議:SDK 的 Items 增加 Key Name 判斷

程式參考

  • 範例中的 Items 陣列包含 Key Name Name Price Currency Quantity

    //訂單的商品資料
    array_push($obj->Send['Items'], array('Name' => "歐付寶黑芝麻豆漿", 'Price' => (int)"2000",
    'Currency' => "", 'Quantity' => (int) "1", 'URL' => "dedwed"));

  • SDK 中轉換的方式卻是使用 array 的方法轉為字串

    foreach ($arParameters['Items'] as $keys => $value) {
    $szItemName .= vsprintf('#%s %d %s x %u', $arParameters['Items'][$keys]);
    if (!array_key_exists('ItemURL', $arParameters)) {
    if(array_key_exists('URL', $arParameters['Items'][$keys])) {
    $arParameters['ItemURL'] = $arParameters['Items'][$keys]['URL'];
    }
    }
    }

可能遇到問題

  • 如果 Name Price Currency Quantity 在程式端指定的順序跟範例不一樣時,會造成字串顯示與預期不符
    • ex ['Name' => 'TEST', 'Price' => 100, 'Quantity' => 1, 'Currency' => '元'] 會變成 TEST 100 1 x 0

建議

  1. SDK 中分別判斷上述四個名稱以產生最終結果或丟出錯誤訊息
  2. 文件中說明以上四個名稱需要按照順序指派

以上為實作時剛好遇到的問題給個心得,
也希望對剛好有遇到類似問題的開發者有所幫助~

驗證規則異常

在 ECPay.Logistics.Integration.php 中所使用的正規式規則 /[\^\'`\!@#%&\*\+\\\"<>\|_\[\]]+/ 會造成部份中文字元判斷異常,而導致驗證不通過,因為規則中使用了全形@而導致

開立發票問題

最近開立電子發票有時會收到下面問題

6:CustomerIdentifier

12:CustomerIdentifier

想請問是什麼原因造成的

每次補開發票都很辛苦

建立物流單

有時候會出現這個錯誤,Could not resolve host
我DNS該怎麼設定,我是跟digital ocean租的伺服器

在PHP 8.0中, HtmlEncode的function會顯示錯誤

在603行的function
第一個參數有預設字串
但是在PHP 8.0中會顯示錯誤
似乎是8.0有刪除部分功能

原本第一個參數是這樣
protected static function HtmlEncode($target = "_self", $arParameters, $ServiceURL, $szCheckMacValue, $paymentButton = '')
改為這樣
protected static function HtmlEncode($target, $arParameters, $ServiceURL, $szCheckMacValue, $paymentButton = '')
就沒有問題了
呼叫CheckOut function也沒問題

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.