php中的定期月度付款方式
我需要支付网关来处理经常性的每月付款使用威威。我在威威登记 并收到沙盒客户ID、沙盒用户名、登录URL 我使用php(CodeIgniter 2.1)。我有链接在。 但我不知道这在我的php应用程序中是如何使用的。我必须使用带有SoapClient函数的soap库吗? 请给出一些php的例子 提前谢谢php中的定期月度付款方式,php,payment,recurring,Php,Payment,Recurring,我需要支付网关来处理经常性的每月付款使用威威。我在威威登记 并收到沙盒客户ID、沙盒用户名、登录URL 我使用php(CodeIgniter 2.1)。我有链接在。 但我不知道这在我的php应用程序中是如何使用的。我必须使用带有SoapClient函数的soap库吗? 请给出一些php的例子 提前谢谢 谢谢, 但我还有几个问题: $eWay = new eWay('REAL_TIME_CVN', TRUE); // Which must be this parameter if I use
谢谢, 但我还有几个问题:
$eWay = new eWay('REAL_TIME_CVN', TRUE); // Which must be this parameter if I use sandbox for testing ?
$eWay
->setCustomerID('87654321') // Is it customer ID I recieved when I registered at eWay site ?
->setCardNumber('4444333322221111') // Is this parameter and parameters below are data of User(not customer above) who pays money to Customer above ?
->setCardHoldersName('John Smith')
->setPaymentAmount(1.00)
->setCardExpiry('08', '09')
->setCVN('123')
->setCustomerFirstName('Firstname')
->setCustomerLastName('Lastname')
->setCustomerEmail('name@xyz.com.au')
->setCustomerAddress('123 Someplace Street, Somewhere ACT')
->setCustomerPostcode('2609')
->setCustomerInvoiceReference('INV120394')
->setCustomerInvoiceDescription('Testing')
->setCustomerTransactionReference('4230')
->setOption1('Option Number One')
->setOption2('Option Number Two')
->setOption3('Option Number Three')
;
$eWay->pay(); // I do not have to pay, but I have to verify if payment is made monthly. Which menthod have I to use?
在Way类中,我找到了loadPaymentResponse方法的定义:
public function loadPaymentResponse($response_string)
{
$response = simplexml_load_string($response_string);
$this->transactionError = (string) $response->{'ewayTrxnError'};
$this->transactionStatus = (string) $response->{'ewayTrxnStatus'};
$this->transactionNumber = (string) $response->{'ewayTrxnNumber'};
$this->transactionReference = (string) $response->{'ewayTrxnReference'};
$this->transactionAmount = (string) $response->{'ewayReturnAmount'};
$this->transactionAuthNumber = (string) $response->{'ewayAuthCode'};
$this->transactionOption1 = (string) $response->{'ewayTrxnOption1'};
$this->transactionOption2 = (string) $response->{'ewayTrxnOption2'};
$this->transactionOption3 = (string) $response->{'ewayTrxnOption3'};
$this->transactionBeagleScore = (string) $response->{'ewayBeagleScore'};
if(preg_match('/^\d{2}/', $this->transactionError, $code))
{
$this->responseCode = $code[0];
}
}
但是什么是$response\u string参数?way在我们的合作伙伴门户中提供了两个PHP示例,用于定期付款。一个示例是Recurrence的XML版本,第二个示例是web服务版本,它是首选的和部署更广泛的API集成。Web服务示例是围绕NuSOAP构建的,示例代码中也包含了这些库。您可以从我们的合作伙伴门户网站下载样本,如果您有任何问题,请随时发送电子邮件support@eway.com.au或者访问www.way.com.au,与我们的技术支持团队进行现场聊天。