我正在使用Authorize.NET PHP SDK。我添加了以下代码来验证CVV代码
$auth = new AuthorizeNetAIM;
$auth->amount = $amount;
$auth->card_num = $cc;
$auth->exp_date = $expiry_date;
$auth->x_card_code = $cc;
但现在我得到以下异常:
Error: Uncaught exception 'AuthorizeNetException' with message 'Error: no field x_card_code exists in the AIM API.
如何验证CVV?
答案 0 :(得分:3)
我使用了错误的字段名称,它的card_code不是x_card_code。
$auth = new AuthorizeNetAIM;
$auth->amount = $amount;
$auth->card_num = $cc;
$auth->exp_date = $expiry_date;
$auth->card_code = $cc;