我正在尝试将BIZUM付款方式整合到prestashop商店中,为此我已经安装了付款方式插件" redsys"我正在修改它,因为我所做的是从模块中获取文件redsys.php并通过此代码修改它
/*
* HOOK V1.7
*/
public function hookPaymentOptions($params) {
if (! $this->active) {
return;
}
if (! $this->checkCurrency ( $params ['cart'] )) {
return;
}
$this->createParameter($params);
$urlBizum = 'https://sis-t.redsys.es:25443/sis/realizarPago';
$newOption2 = new \PrestaShop\PrestaShop\Core\Payment\PaymentOption();
$newOption2->setCallToActionText ($this->l('Pago con Bizum' ))
->setAction ($urlBizum)
->setInputs([
'Ds_SignatureVersion' => [
'name' =>'Ds_SignatureVersion',
'type' =>'hidden',
'value' =>$this->version2,
],
'Ds_MerchantParameters' => [
'name' =>'Ds_MerchantParameters',
'type' =>'hidden',
'value' =>$this->paramsBase64,
],
'Ds_Signature' => [
'name' =>'Ds_Signature',
'type' =>'hidden',
'value' => $this->signatureMac,
],
'Ds_Merchant_PayMethods' => [
'name' =>'Ds_Merchant_PayMethods',
'type' =>'hidden',
'value' => 'z',
],
]);
$payment_options = [$newOption2];
return $payment_options;
}
我遇到的问题是我得到了redsys的TVP画面......而不是我等待的奇迹。
谢谢