理想的金额支付网关问题

时间:2012-02-02 11:33:07

标签: php mysql

我正在向网关发送金额2EUR,现在将其替换为0,02。在理想状态下收到错误的金额并且测试状态没有得到更新。

$amount = 2;    
$newAmount = 2.2;

导致这种情况的原因是什么?

2 个答案:

答案 0 :(得分:1)

你需要100倍的数量

正如其文档中所述。

  

所有金额(金额,itemPrice)应以整个eurocents给出。   因此,对于成本为1欧元的产品,您应输入“100”作为   价钱。不接受小数。

答案 1 :(得分:1)

要发送2欧元,您需要执行以下操作:


$amount = 200; //2 * 100,which will show 2,00

以美分给出的付款金额。例如,10欧元是'金额= 1000'。 参考:iDEAL API

您的conf文件应该是:like:


PRIVATEKEY=priv.pem
#enter your password below
PRIVATEKEYPASS=ownPassword
PRIVATECERT=cert.cer
CERTIFICATE0=webserver.cer
#ACQUIRERURL=ssl://idealtest.secure-ing.com:443/ideal/iDeal
#for the production environment use URL below:
ACQUIRERURL=ssl://ideal.secure-ing.com:443/ideal/iDeal
ACQUIRERTIMEOUT=10
#enter your merchant id below
MERCHANTID=your merchant id here
SUBID=0
#enter payment confirmation url
MERCHANTRETURNURL=http://localhost/idealmain/index.php
EXPIRATIONPERIOD=PT10M
#enter the path to the logfile below
LOGFILE=Connector_log.txt
TraceLevel = DEBUG,ERROR
#PROXY=Vul hier een proxyserver in (gebruik dit ALLEEN als de webshop achter een proxyserver zit)
#PROXYACQURL=vul hier de url van de acquirer in (gebruik dit ALLEEN als de webshop achter een proxyserver zit)

相关问题