I am switching from Accept.js to Accept Customer to reduce our SAQ requirements and one of the PHP functions I am borrowing is from getAcceptCustomerProfilePage()
I basically understand what it is doing but when I attempt to set the hostedProfileCardCodeRequired to true it generates an an error:
Payment gateway response (E00013): Invalid Setting Value. hostedProfileCardCodeRequired must be true or false.
I modified the code slightly to use the ArrayOfSettingType class and what I did was:
$alist = new AnetAPI\ArrayOfSettingType();
$setting = new AnetAPI\SettingType();
$setting->setSettingName("hostedProfileCardCodeRequired");
$setting->setSettingValue(true);
$alist->addToSetting($setting);
...
$request->setHostedProfileSettings($alist->getSetting());Whenever I remove the setting of hostedProfileCardCodeRequired the code works. I am setting the value to boolean true. What am I doing wrong?
Solved! Go to Solution.
07-05-2018 11:31 AM
I guess I found my own answer - instead of passing the PHP true boolean I quoted the word as "true" and it passed.
$setting->setSettingValue("true");
07-05-2018 03:24 PM
I guess I found my own answer - instead of passing the PHP true boolean I quoted the word as "true" and it passed.
$setting->setSettingValue("true");
07-05-2018 03:24 PM