授权.net CIM:如何将createProfile = true发送到使用PHP API的交易中



API文档说将CreateProfile设置为true。我找不到一个例子,因此在搜索后,我找到了SetCreateprofile方法。我这样使用。我没有错误。

$ this-> custPaymentProfile = new Anetapi CustomerProfilePaymentType();$ this-> CustPaymentProfile-> setCreateProfile(true);

我不知道如何通过交易发送此设置,以创建客户配置文件。

所有其他数据均通过anetapi transactionrequesttype()

发送

ie:$ this-> transactionRequestType-> setOrder($ this-> order);

其他所有工作都可以运行,我可以成功进行交易,只需要将其创建一个配置文件。

找到了它:

$profile = new AnetAPICustomerProfilePaymentType();
$profile->setCreateProfile(true); 
$transactionRequestType->setProfile($profile);

最新更新