title: retrieving authorize.net credit card number in sugarcrm v6.5
body: <p>I want to retrieve the CC number from authorize.net and display it in sugarcrm v6.5 my problem now is that in the documentation found in authorize.net the code is meant for native PHP. And I just started learning sugarcrm, now what I want to learn is how do I use the code in their document to match sugarcrm.</p>
  
  <p>this it the link to their code I want to use <a href="https://github.com/AuthorizeNet/sample-code-php/blob/master/CustomerProfiles/get-customer-payment-profile.php" rel="nofollow">link here</a></p>
  
  <p>this is my current implementation. And I get this error in sugarcrm: "There was an error processing your request, please try again at a later time."</p>
  
  <pre><code>&lt;?php
  require_once("include/MVC/View/views/view.detail.php");
  use CB\Integrations\Provider\AuthorizeNet;
  
  class CB_PaymentProfilesViewDetail extends ViewDetail
  {
      var $contacts_warning;
      var $company_logo_path;
      var $company_tagline;
      var $provider;
      public function __construct()
      {
          global $sugar_config;
          $settings = $sugar_config["authorizenet_settings"];
          $this-&gt;provider = new AuthorizeNet();
          $this-&gt;provider-&gt;auth($settings["appName"], $settings["transactionKey"]);
          parent::ViewDetail();
      }
      function preDisplay() {
          $this-&gt;contacts_warning = 'Our contacts database is not for personal use. Please do not use it for things not strictly related to company business. You know who you are!';
  
          $this-&gt;company_tagline = 'Serving the biggest and brightest stars in Hollywood!';
          parent::preDisplay();
      }
      public function display()
      {
  
          $this-&gt;provider-&gt;setCustomerProfileId(40843288);
          echo '&lt;div align="center" style="font-color: red"&gt;'.$this-&gt;provider-&gt;getCustomerPaymentProfileId() .'&lt;/div&gt;';
          if ($this-&gt;bean-&gt;name) {
              $this-&gt;dv-&gt;defs['templateMeta']['form']['buttons'][] = array(
                  "customCode" =&gt; '{$CUSTOMER_PROFILE}'
              );
              $this-&gt;ss-&gt;assign('CUSTOMER_PROFILE',
                  $this-&gt;bean-&gt;provider-&gt;getHostedProfilePageButton($this-&gt;bean-&gt;name)
              );
          }
          parent::display();
      }
  }
  </code></pre>