Most of my questions have been answered but I can't seem to get this to work.
I can run a successful transaction and add customer billing info, but I can't get it to create a profile for me.
In a previous post I was told to set createProfile=true. I am trying to do that like so:
$this->custpaymentprofile = new AnetAPI\CustomerProfilePaymentType();
$this->custpaymentprofile->setCreateProfile(true);
How do I send custpaymentprofile to the transaction?
Example: $this->transactionRequestType->setBillTo($this->billto);
How do I send the createProfile info?
Thanks,
- D
Solved! Go to Solution.
06-15-2016 10:17 AM
I'm not sure in your code sample here exactly what $this is referring to. In our sample code, we generally have a transactionRequestType object that is simply named $transactionRequestType. In order to add the flag to create a profile to one of our samples, you would need to add this code:
$profile = new AnetAPI\CustomerProfilePaymentType(); $profile->setCreateProfile(true); $transactionRequestType->setProfile($profile);
06-15-2016 12:11 PM
I'm not sure in your code sample here exactly what $this is referring to. In our sample code, we generally have a transactionRequestType object that is simply named $transactionRequestType. In order to add the flag to create a profile to one of our samples, you would need to add this code:
$profile = new AnetAPI\CustomerProfilePaymentType(); $profile->setCreateProfile(true); $transactionRequestType->setProfile($profile);
06-15-2016 12:11 PM
Thanks, this is what I was looking for:
$transactionRequestType->setProfile($profile)
Thanks,
- D
06-15-2016 01:07 PM
Hi, I've an implementation for PHP, for some reason when trying to instantiate a new class of CustomerProfilePaymentType it's throwing a class not found exception, can you please give me some advice? I've checked and everything seems to be fine there: sdk-php/lib/net/authorize/api/contract/v1/
07-01-2019 10:04 AM