我尝试发送EBICS HPB请求,但总是得到相同的错误:
EBICS_AUTHENTICATION_FAILED
我认为问题出在我的代码上,下面是代码为获取签名值所做的工作:
然后我把结果作为签名值,但我不确定在发送请求之前做正确的程序。
答案 0 :(得分:0)
您可以使用此库 Ebics client PHP 来检索 HPB 响应:
use AndrewSvirin\Ebics\Services\KeyRingManager;
use AndrewSvirin\Ebics\Models\Bank;
use AndrewSvirin\Ebics\Models\User;
use AndrewSvirin\Ebics\EbicsClient;
// Prepare `workspace` dir in the __PATH_TO_WORKSPACES_DIR__ manually.
$keyRingRealPath = __PATH_TO_WORKSPACES_DIR__ . '/workspace/keyring.json';
// Use __IS_CERTIFIED__ true for French banks, otherwise use false.
$keyRingManager = new KeyRingManager($keyRingRealPath, __PASSWORD__);
$keyRing = $keyRingManager->loadKeyRing();
$bank = new Bank(__HOST_ID__, __HOST_URL__);
$bank->setIsCertified(__IS_CERTIFIED__);
$user = new User(__PARTNER_ID__, __USER_ID__);
$client = new EbicsClient($bank, $user, $keyRing);
$hpb = $client->HPB();