搜索 Authorize.net CIM 记录

发布于 2024-10-04 00:57:38 字数 268 浏览 1 评论 0原文

有没有人想出一种优雅的方法来搜索存储在 Authorize.net 的客户信息管理器 (CIM) 上的数据?

根据他们的 XML 指南,似乎根本没有任何搜索功能。这是一个巨大的缺点。

据我了解,CIM的卖点是商家不需要存储任何客户信息。它们仅存储每个数据的唯一标识符并根据需要检索数据。从 PCI 合规性的角度来看,这可能很棒,但从灵活性的角度来看,这很糟糕。

像“显示来自德克萨斯州的所有订单”这样的简单搜索突然变得非常复杂。

你们其他人如何处理这个问题?

Has anyone come up with an elegant way to search data stored on Authorize.net's Customer Information Manager (CIM)?

Based on their XML Guide there doesn't appear to be any search capabilities at all. That's a huge short-coming.

As I understand it, the selling point for CIM is that the merchant doesn't need to store any customer information. They merely store a unique identifier for each and retrieve the data as needed. This may be great from a PCI Compliance perspective, but it's horrible from a flexibility standpoint.

A simple search like "Show me all orders from Texas" suddenly becomes very complicated.

How are the rest of you handling this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

蹲在坟头点根烟 2024-10-11 00:57:38

简短的回答是,您是对的:没有用于搜索 CIM 记录的 API 支持。由于其结构方式,单独使用 CIM 来搜索所有记录并不简单。

要按照您描述的方式搜索它们:

  1. 使用 getCustomerProfileIdsRequest 获取您存储的所有客户配置文件 ID。
  2. 对于该请求返回的每个 CustomerProfileId,使用 getCustomerProfileRequest 获取该客户端的特定记录。
  3. 检查当时的每条记录,寻找所需的标准,将相关记录存储在其他结构中;一个类、一个多维数组、一个 ADO DataTable,等等。

是的,这很繁重。但这实际上是继续进行的唯一方法。

前面提到的报告 API 仅适用于交易,不适用于客户信息管理器。

请注意,您可以在记录交易时收集您想要的数据类型,并且只要您不将其设置为可识别个人身份,就可以将其存储在本地。

例如,您可以对所有 CIM 客户配置文件记录运行请求,并将每个客户所在的状态存储在本地数据库中。

如果您存储的只是状态,那么您可以使用这些记录,因为没有任何东西将状态与特定的客户记录联系起来。展望未来,您可以编写逻辑来更新本地状态记录存储,同时创建/更新客户档案记录。

我知道这可能不是你想听到的,但这是休息时间。

The short answer is, you're correct: There is no API support for searching CIM records. And due to the way it is structured, there is no easy way to use CIM alone for searching all records.

To search them in the manner you describe:

  1. Use getCustomerProfileIdsRequest to get all the customer profile IDs you have stored.
  2. For each of the CustomerProfileIds returned by that request, use getCustomerProfileRequest to get the specific record for that client.
  3. Examine each record at that time, looking for the criterion you want, storing the pertinent records in some other structure; a class, a multi-dimensional array, an ADO DataTable, whatever.

Yes, that's onerous. But it is literally the only way to proceed.

The previously mentioned reporting API applies only to transactions, not the Customer Information Manager.

Note that you can collect the kind of data you want at the time of recording a transaction, and as long as you don't make it personally identifiable, you can store it locally.

For example, you could run a request for all your CIM customer profile records, and store the state each customer is from in a local database.

If all you store is the state, then you can work with those records, because nothing ties the state to a specific customer record. Going forward, you could write logic to update the local state record store at the same time customer profile records are created / updated, too.

I realize this probably isn't what you wanted to hear, but them's the breaks.

锦上情书 2024-10-11 00:57:38

这可能非常缓慢且低效。但这里有一种方法。请求所有客户 ID 的数组,然后检查每个客户 ID 中是否有您想要的字段...在我的例子中,我想要 PHP 中的通过电子邮件搜索功能:

$cimData = new AuthorizeNetCIM;
$profileIds = $cimData->getCustomerProfileIds();

$profileIds = $cimData->getCustomerProfileIds();
$array = $profileIds->xpath('ids');
$authnet_cid = null;

/*
this seems ridiculously inefficient... 
gotta be a better way to lookup a customer based on email
*/

    foreach ( $array[0]->numericString as $ids ) { // put all the id's into an array
       $response = $cimData->getCustomerProfile($ids); //search an individual id for a match
    //put the kettle on

        if ($response->xml->profile->email == $email) {
            $authnet_cid = $ids;
            $oldCustomerProfile = $response->xml->profile;
        }
    }

// 现在茶已经准备好了,奶油,糖,饼干,你可能就有你的搜索结果了!

This is likely to be VERY slow and inefficient. But here is one method. Request an array of all the customer Id's, and then check each one for the field you want... in my case I wanted a search-by-email function in PHP:

$cimData = new AuthorizeNetCIM;
$profileIds = $cimData->getCustomerProfileIds();

$profileIds = $cimData->getCustomerProfileIds();
$array = $profileIds->xpath('ids');
$authnet_cid = null;

/*
this seems ridiculously inefficient... 
gotta be a better way to lookup a customer based on email
*/

    foreach ( $array[0]->numericString as $ids ) { // put all the id's into an array
       $response = $cimData->getCustomerProfile($ids); //search an individual id for a match
    //put the kettle on

        if ($response->xml->profile->email == $email) {
            $authnet_cid = $ids;
            $oldCustomerProfile = $response->xml->profile;
        }
    }

// now that the tea is ready, cream, sugar, biscuits, you might have your search result!

谎言 2024-10-11 00:57:38

CIM 的主要目的是通过允许您将客户数据(包括信用卡)存储在其服务器上,然后仅使用唯一 ID 来访问这些数据,从而使您摆脱 PCI 合规性问题。如果您想进行报告,您将需要自己跟踪此类信息。由于存储客户地址等不存在 PCI 合规性问题,因此您自己执行此操作是现实的。基本上,这是在项目设计阶段需要清除的东西。

他们确实有一个新的报告 API,可以为您提供此功能。如果没有,很可能会在不久的将来提供,因为 Authnet 目前正在积极为其 API 推出许多新功能。

CIM's primary purpose is to take PCI compliance issues out of your hands by allowing you to store customer data, including credit cards, on their server and then access them using only a unique ID. If you want to do reporting you will need to keep track of that kind of information yourself. Since there's no PCI compliance issues with storing customer addresses, etc, it's realistic to do this yourself. Basically, this is the kind of stuff that needs to get flushed out during the design phase of the project.

They do have a new reporting API which may offer you this functionality. If it does not it's very possible it will be offered in the near future as Authnet is currently actively rolling out lots of new features to their APIs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文