我想从authorize.net检索CC号并在sugarcrm v6.5中显示它我现在的问题是在authorize.net中找到的文档中,代码是用于本机PHP的。我刚开始学习sugarcrm,现在我想学习的是如何使用他们文档中的代码来匹配sugarcrm。
这是我想要使用link here
的代码的链接这是我目前的实施。我在sugarcrm中收到此错误:"处理您的请求时出错,请稍后再试。"
<?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->provider = new AuthorizeNet();
$this->provider->auth($settings["appName"], $settings["transactionKey"]);
parent::ViewDetail();
}
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!';
parent::preDisplay();
}
public function display()
{
$this->provider->setCustomerProfileId(40843288);
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}'
);
$this->ss->assign('CUSTOMER_PROFILE',
$this->bean->provider->getHostedProfilePageButton($this->bean->name)
);
}
parent::display();
}
}