Php 以日元支付的经常性付款
我试图启动一个定期付款在Adyen,但我无法想出如何做到这一点。我已尝试发送请求以获取付款结果:Php 以日元支付的经常性付款,php,adyen,Php,Adyen,我试图启动一个定期付款在Adyen,但我无法想出如何做到这一点。我已尝试发送请求以获取付款结果: $request = array( 'amount.currency' => $this->currency, 'amount.value' => $sepaSubmission->amount, 'merchantAccount' => $this->merchant
$request = array(
'amount.currency' => $this->currency,
'amount.value' => $sepaSubmission->amount,
'merchantAccount' => $this->merchantAccount,
'recurring.contract' => "RECURRING,ONECLICK",
'reference' => $sepaSubmission->psp_reference,
'shopperEmail' => $account->email,
'shopperReference' => $account->email,
"selectedRecurringDetailReference" => "LATEST",
"skinCode" => env('ADYEN_SKIN_CODE'),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_USERPWD, env('ADYEN_USERNAME') . ":" . env('ADYEN_PASSWORD'));
curl_setopt($ch, CURLOPT_URL, "https://test.adyen.com/hpp/pay.shtml");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST,count($request));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($request));
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
我得到以下错误:错误:皮肤null不存在
我已验证是否包含有效的皮肤代码
我使用SepaDirect作为付款方式
我还尝试将上述字段附加到我正在使用的初始付款提交表单中,但它们基本上被忽略,付款是一次性处理的
如果您能提供任何帮助,我将不胜感激。我已经在文件中搜索了好几天,但都无济于事。看来您正试图重定向到皮肤,以便进行后续Sepa交易。这是因为您正在呼叫“” Sepa直接借记可通过API直接处理,无需将购物者发送至HPP 您可以执行以下操作:
$request = array(
'amount.currency' => $this->currency,
'amount.value' => $sepaSubmission->amount,
'merchantAccount' => $this->merchantAccount,
'recurring.contract' => "RECURRING",
'reference' => $sepaSubmission->psp_reference,
'shopperEmail' => $account->email,
'shopperReference' => $account->email,
"selectedRecurringDetailReference" => "LATEST",
"shopperInteraction" : "ContAuth",
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_USERPWD, env('ADYEN_USERNAME') . ":" . env('ADYEN_PASSWORD'));
curl_setopt($ch, CURLOPT_URL, "https://pal-test.adyen.com/pal/servlet/Payment/v25/authorise");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST,count($request));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($request));
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
请注意URL的更改、皮肤代码的删除以及“shopperInteraction”的添加:“ContAuth”,以及一键登录的删除
定期。合同“=>”定期“
因此,当你想再次向购物者收费时,你只需从你这边打这个电话,就不需要把他送到HPP
希望这有帮助
干杯,
安德鲁