Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 使用activemerchant授权.net参数_Ruby On Rails_Activemerchant_Authorize.net - Fatal编程技术网

Ruby on rails 使用activemerchant授权.net参数

Ruby on rails 使用activemerchant授权.net参数,ruby-on-rails,activemerchant,authorize.net,Ruby On Rails,Activemerchant,Authorize.net,我正在rails应用程序中使用authorize.net和activemerchant 当我购买时,authorize.net会发回一封包含购买信息的电子邮件。我应该能够向他们发送账单和发货地址信息,并在电子邮件中返回,但它不会返回任何信息,显然我的可变名称搞错了,有人知道它们应该是什么吗?我一直在浏览authorize.net api文档和activemerchant文档,但找不到我需要的东西 我在订单模型上的购买方法如下所示: def purchase purchase_options

我正在rails应用程序中使用authorize.net和activemerchant

当我购买时,authorize.net会发回一封包含购买信息的电子邮件。我应该能够向他们发送账单和发货地址信息,并在电子邮件中返回,但它不会返回任何信息,显然我的可变名称搞错了,有人知道它们应该是什么吗?我一直在浏览authorize.net api文档和activemerchant文档,但找不到我需要的东西

我在订单模型上的购买方法如下所示:

def purchase
  purchase_options = {
    :ip                   => ip_address,
    :first_name           => first_name,
    :last_name            => last_name,
    :address              => billing_street_address,
    :city                 => billing_city,
    :state                => billing_state,
    :country               => "US",
    :zip                  => billing_zip,
    :ship_to_first_name   => first_name,
    :ship_to_last_name    => last_name,
    :ship_to_address      => shipping_street_address,
    :ship_to_city         => shipping_city,
    :ship_to_state        => shipping_state,
    :ship_to_country      => "US",
    :ship_to_zip          => shipping_zip
  }
response = GATEWAY.purchase(price_in_cents, credit_card, purchase_options)
# other transaction stuff
response.success?

结束安装fiddler并查看您得到的原始响应。authorize.net应该给您一些错误提示。

安装fiddler并查看您得到的原始响应。authorize.net应该给你一些错误提示。

账单地址变量是:x_名字、x_姓氏、x_公司、x_地址、x_城市、x_州、x_邮政编码、x_国家、x_电话、x_传真

装运变量为:x_ship_to_first_name、x_ship_to_last_name、x_ship_to_company、x_ship_address、x_ship_to_city、x_ship_to_state、x_ship_to_zip、x_ship_to_country

您可以省略任何不希望提供的内容,因为它们都是可选的


您可以在第21-25页的中找到这些变量。

账单地址变量是:x_名字、x_姓氏、x_公司、x_地址、x_城市、x_州、x_邮政编码、x_国家、x_电话、x_传真

装运变量为:x_ship_to_first_name、x_ship_to_last_name、x_ship_to_company、x_ship_address、x_ship_to_city、x_ship_to_state、x_ship_to_zip、x_ship_to_country

您可以省略任何不希望提供的内容,因为它们都是可选的


您可以在第21-25页的中找到这些信息。

我正在尝试x_循环,但看不到响应,甚至事务也没有在循环中显示。你能帮我一下吗?同样,我正在尝试x_循环,但看不到响应,甚至交易也没有在循环中显示。你能帮我一下吗。