AnsweredAssumed Answered

how to get getCustomerPaymentProfileId from

Question asked by Rodolfo Tuble on Jun 3, 2016

I am following this link

but it is meant for native PHP and I want to know how do I convert it to be suitable for SugarCRM?


This is my code at the moment:


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->provider = new AuthorizeNet();
   $this->provider->auth($settings["appName"], $settings["transactionKey"]);
   function preDisplay() {
   $this->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->company_tagline = 'Serving the biggest and brightest stars in Hollywood!';
   public function display()

   echo '<div align="center" style="font-color: red">'.$this->provider->getCustomerPaymentProfileId() .'</div>';
   if ($this->bean->name) {
   $this->dv->defs['templateMeta']['form']['buttons'][] = array(
   "customCode" => '{$CUSTOMER_PROFILE}'