<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't fail in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-fail/m-p/63985#M37991</link>
    <description>&lt;P&gt;Just in case anyone else has this problem, it seems that setting this explicitly to true works:&lt;/P&gt;&lt;PRE&gt;    {
        "settingName": "hostedPaymentBillingAddressOptions",
        "settingValue": "{\"show\": true}"
    },&lt;/PRE&gt;&lt;P&gt;It was sort of discussed here: &lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/Accept-Hosted-Payment-Form-billing-field-entries-suddenly-being/m-p/60513#M35039" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/Accept-Hosted-Payment-Form-billing-field-entries-suddenly-being/m-p/60513#M35039&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This thread was from Nov 2017 -&amp;nbsp;and said that even tho the default was 'true', if not set then null was not considered 'true'.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Aug 2018 05:51:30 GMT</pubDate>
    <dc:creator>dbr11</dc:creator>
    <dc:date>2018-08-01T05:51:30Z</dc:date>
    <item>
      <title>Can't fail</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-fail/m-p/63983#M37989</link>
      <description>&lt;P&gt;I can't get a credit card to fail. I pre-populate the billing address/info, but when I write over it on the payment form to enter a failing zip code,&amp;nbsp;the new info is ignored. All new info is ignored - name, address, etc.&amp;nbsp; The receipt page shows only the original info. What am I missing?&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;This is my code requesting a token:&lt;/P&gt;&lt;PRE&gt;    $merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
    $merchantAuthentication-&amp;gt;setName($loginid);
    $merchantAuthentication-&amp;gt;setTransactionKey($txkey);
    
    //create a transaction
    $transactionRequestType = new AnetAPI\TransactionRequestType();
    $transactionRequestType-&amp;gt;setTransactionType("authCaptureTransaction"); 
    $transactionRequestType-&amp;gt;setAmount($amount);      

    //Preparing customer information object
    $cust = new AnetAPI\CustomerAddressType();
    $cust-&amp;gt;setFirstName($member-&amp;gt;f_name);
    $cust-&amp;gt;setLastName($member-&amp;gt;l_name);
    $cust-&amp;gt;setAddress($member-&amp;gt;address1);
    $cust-&amp;gt;setCity($member-&amp;gt;city);
    $cust-&amp;gt;setState($member-&amp;gt;state);
    $cust-&amp;gt;setCountry($member-&amp;gt;country);
    $cust-&amp;gt;setZip($member-&amp;gt;zip);
    $cust-&amp;gt;setPhoneNumber($member-&amp;gt;phone);
    $cust-&amp;gt;setEmail($member-&amp;gt;email);  
    
    $transactionRequestType-&amp;gt;setBillTo($cust);
    
    // Set the customer's identifying information   
    $customerData = new AnetAPI\CustomerDataType();
    $customerData-&amp;gt;setType("individual");
    $customerData-&amp;gt;setId($member-&amp;gt;id);
    $customerData-&amp;gt;setEmail($member-&amp;gt;email);
    
    $transactionRequestType-&amp;gt;setCustomer($customerData);
      
    //Preparing order information object
    $ord = new AnetAPI\OrderType();
    $ord-&amp;gt;setDescription("Dues for: ".$yrs);
    $ord-&amp;gt;setInvoiceNumber($refId); 
    
    $transactionRequestType-&amp;gt;setOrder($ord);
   
    //Userfields:   userFields  name  value 
    $uf1 = new AnetAPI\UserFieldType();
    $uf1-&amp;gt;setName('memberid');
    $uf1-&amp;gt;setValue($member-&amp;gt;id);
    
    $uf2 = new AnetAPI\UserFieldType();
    $uf2-&amp;gt;setName('dues_yr');
    $uf2-&amp;gt;setValue($yrs);
 
    $transactionRequestType-&amp;gt;addToUserFields($uf1);
    $transactionRequestType-&amp;gt;addToUserFields($uf2);
    
    // Set Hosted Form options     
    $setting1 = new AnetAPI\SettingType();
    $setting1-&amp;gt;setSettingName("hostedPaymentButtonOptions");
    $setting1-&amp;gt;setSettingValue("{\"text\": \"Pay Dues\"}");

    $setting2 = new AnetAPI\SettingType();
    $setting2-&amp;gt;setSettingName("hostedPaymentOrderOptions");
    $setting2-&amp;gt;setSettingValue("{\"show\": true}");

    $setting3 = new AnetAPI\SettingType();
    $setting3-&amp;gt;setSettingName("hostedPaymentReturnOptions");    
    $setting3-&amp;gt;setSettingValue("{\"url\": \"https://www.xxxx/members/dues.php?msg=payment\", \"cancelUrl\": \"https://www.xxxx/members/dues.php?refId=$refId\", \"showReceipt\": true}"); 

    $setting4 = new AnetAPI\SettingType();
    $setting4-&amp;gt;setSettingName("hostedPaymentCustomerOptions");
    $setting4-&amp;gt;setSettingValue("{\"showEmail\": true}");
    
    $setting5 = new AnetAPI\SettingType();
    $setting5-&amp;gt;setSettingName("hostedPaymentPaymentOptions");
    $setting5-&amp;gt;setSettingValue("{\"cardCodeRequired\": true}");
    $setting5-&amp;gt;setSettingValue("{\"showCreditCard\": true}");
    $setting5-&amp;gt;setSettingValue("{\"showBankAccount\": false}");
    
    // Build transaction request    
    $request = new AnetAPI\GetHostedPaymentPageRequest();
    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);
    $request-&amp;gt;setTransactionRequest($transactionRequestType);
    $request-&amp;gt;setRefId($refId);

    $request-&amp;gt;addToHostedPaymentSettings($setting1);
    $request-&amp;gt;addToHostedPaymentSettings($setting2);
    $request-&amp;gt;addToHostedPaymentSettings($setting3);
    $request-&amp;gt;addToHostedPaymentSettings($setting4);
    $request-&amp;gt;addToHostedPaymentSettings($setting5);
    
    //execute request
    $controller = new AnetController\GetHostedPaymentPageController($request);
    $response = $controller-&amp;gt;executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);}&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Aug 2018 00:16:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-fail/m-p/63983#M37989</guid>
      <dc:creator>dbr11</dc:creator>
      <dc:date>2018-08-01T00:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can't fail</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-fail/m-p/63985#M37991</link>
      <description>&lt;P&gt;Just in case anyone else has this problem, it seems that setting this explicitly to true works:&lt;/P&gt;&lt;PRE&gt;    {
        "settingName": "hostedPaymentBillingAddressOptions",
        "settingValue": "{\"show\": true}"
    },&lt;/PRE&gt;&lt;P&gt;It was sort of discussed here: &lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/Accept-Hosted-Payment-Form-billing-field-entries-suddenly-being/m-p/60513#M35039" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/Accept-Hosted-Payment-Form-billing-field-entries-suddenly-being/m-p/60513#M35039&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This thread was from Nov 2017 -&amp;nbsp;and said that even tho the default was 'true', if not set then null was not considered 'true'.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 05:51:30 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-fail/m-p/63985#M37991</guid>
      <dc:creator>dbr11</dc:creator>
      <dc:date>2018-08-01T05:51:30Z</dc:date>
    </item>
  </channel>
</rss>

