Php 使用Cybersource SOAP API时如何获取支付令牌
因此,我有一个使用Cybersource SOAP API的测试支付,如下所示,但我无法让它返回一个支付令牌,我可以在以后的支付中使用该令牌,而每次都不使用信用卡详细信息:Php 使用Cybersource SOAP API时如何获取支付令牌,php,xml,soap,soapui,cybersource,Php,Xml,Soap,Soapui,Cybersource,因此,我有一个使用Cybersource SOAP API的测试支付,如下所示,但我无法让它返回一个支付令牌,我可以在以后的支付中使用该令牌,而每次都不使用信用卡详细信息: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <ws
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>{{merchant_id}}</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">{{SOAP KEY}}</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.150">
<merchantID>{{merchant_id}}</merchantID>
<merchantReferenceCode>kjdhflasjfhlasdjfasdf</merchantReferenceCode>
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<street1>1295 Charleston Road</street1>
<city>Mountain View</city>
<state>CA</state>
<postalCode>94043</postalCode>
<country>US</country>
<email>null@cybersource.com</email>
</billTo>
<item id="0">
<unitPrice>5.00</unitPrice>
<quantity>1</quantity>
</item>
<item id="1">
<unitPrice>10.00</unitPrice>
<quantity>2</quantity>
</item>
<purchaseTotals>
<currency>ZMW</currency>
</purchaseTotals>
<card>
<accountNumber>4111111111111111</accountNumber>
<expirationMonth>11</expirationMonth>
<expirationYear>2020</expirationYear>
<cvNumber>123</cvNumber>
</card>
<ccAuthService run="true"/>
</requestMessage>
</soapenv:Body>
</soapenv:Envelope>
{{merchant_id}}
{{SOAP KEY}}
{{merchant_id}}
KJDHFLASJFHFLASDJFASDF
约翰
雌鹿
查尔斯顿路1295号
山景
加利福尼亚州
94043
我们
null@cybersource.com
5
1.
10
2.
ZMW
4111111111111111
11
2020
123
将以下内容添加到您的请求中:
<recurringSubscriptionInfo>
<frequency>on-demand</frequency>
</recurringSubscriptionInfo>
<paySubscriptionCreateService run="true"/>
按需
您的新请求将如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>{{merchantID}}</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">{{SOAPKey}}</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.150">
<merchantID>{{merchantID}}</merchantID>
<merchantReferenceCode>kjdhflasjfhlasdjfasdf</merchantReferenceCode>
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<street1>1295 Charleston Road</street1>
<city>Mountain View</city>
<state>CA</state>
<postalCode>94043</postalCode>
<country>US</country>
<email>null@cybersource.com</email>
</billTo>
<item id="0">
<unitPrice>5.00</unitPrice>
<quantity>1</quantity>
</item>
<item id="1">
<unitPrice>10.00</unitPrice>
<quantity>2</quantity>
</item>
<purchaseTotals>
<currency>ZMW</currency>
</purchaseTotals>
<card>
<accountNumber>4111111111111111</accountNumber>
<expirationMonth>11</expirationMonth>
<expirationYear>2020</expirationYear>
<cvNumber>123</cvNumber>
</card>
<recurringSubscriptionInfo>
<frequency>on-demand</frequency>
</recurringSubscriptionInfo>
<ccAuthService run="true"/>
<paySubscriptionCreateService run="true"/>
</requestMessage>
</soapenv:Body>
</soapenv:Envelope>
{{merchantID}}
{{SOAPKey}}
{{merchantID}}
KJDHFLASJFHFLASDJFASDF
约翰
雌鹿
查尔斯顿路1295号
山景
加利福尼亚州
94043
我们
null@cybersource.com
5
1.
10
2.
ZMW
有用
您不应在此处暴露merchantID和SOAP密钥。请编辑您的问题以删除它们。欢迎您。你能把这个标记为答案吗?