cancel
Showing results for 
Search instead for 
Did you mean: 

Get Accept Customer Profile Page cannot set hostedProfileCardCodeRequired value

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?

 

wdbaker54
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

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");

View solution in original post

wdbaker54
Contributor
1 REPLY 1

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");
wdbaker54
Contributor