简体   繁体   English

如何实际测试Shopify经常性费用

[英]How to actually test a Shopify recurring charge

I am writing a Shopify app that apply a recurring charge using Rails. 我正在编写一个Shopify应用,该应用使用Rails收取经常性费用。 When running: ShopifyAPI::RecurringApplicationCharge.get(1076285) I get: 运行时: ShopifyAPI::RecurringApplicationCharge.get(1076285)我得到:

{"activated_on"=>"2015-01-17",
 "api_client_id"=>414133,
 "billing_on"=>"2015-01-17",
 "cancelled_on"=>nil,
 "created_at"=>"2015-01-17T11:44:09+07:00",
 "id"=>1076285,
 "name"=>"Business",
 "price"=>"99.90",
 "return_url"=>
  "https://test14sl.myshopify.com/admin/apps/mshopdev//shops/confirm",
 "status"=>"active",
 "test"=>nil,
 "trial_days"=>0,
 "trial_ends_on"=>"2015-01-17",
 "updated_at"=>"2015-01-17T11:46:24+07:00",
 "decorated_return_url"=>
  "https://test14sl.myshopify.com/admin/apps/mshopdev//shops/confirm?charge_id=1076285"}

Now seding a get request to: https://test14sl.myshopify.com/admin/recurring_application_charges.json 现在将获取请求设置为: https://test14sl.myshopify.com/admin/recurring_application_charges.json ://test14sl.myshopify.com/admin/recurring_application_charges.json

it gives me: 它给了我:

{"recurring_application_charges":[]}

How can I make sure that at the end of the 30 days cycle, I see my app payment entry in the user's receipt/invoice? 如何确保在30天周期结束时,我在用户的收据/发票中看到我的应用程序付款条目?

Why do you need this info? 为什么需要此信息? I've checked the recurring_application_charges.json in a production store with store owner logged in and I get the same. 我已经检查了生产商店中的recurring_application_charges.json,商店所有者已登录,我也得到了相同的结果。 So I guess Shopify has an issue in the API docs on this. 所以我想Shopify在API文档中对此有问题。 If you check by providing the specific charge ID, I'm positive you'll get the answer. 如果您通过提供特定的费用ID进行检查,我肯定会得到答案。 Try to do a GET to this: /admin/recurring_application_charges/#{id}.json 尝试对此执行GET :/ /admin/recurring_application_charges/#{id}.json

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 shopify应用程序费用无法保存 - shopify application charge failing to save 使用Rails设置Shopify定期计费API - Setting up Shopify recurring billing API with Rails Rails 5.2 rspec - 如何测试 model 是否实际使用自定义验证器? - Rails 5.2 rspec - How to test if a model is actually using a custom validator? RSpec:如何测试静态方法被调用但阻止它实际运行? - RSpec: how to test that a static method is called but prevent it from actually running? 用 Mocha 模拟实际上如何让您测试函数中的逻辑? - How does mocking with Mocha actually allow you to test the logic in a function? 我如何查看运行Test :: Unit测试时实际发生的情况? - How can I see what actually happens when a Test::Unit test runs? 如何使用Shopify gem处理Shopify API连接? - How to handle Shopify API connection with Shopify gem? Rails,条纹功能测试错误-参数缺失或值为空:充电 - Rails, stripe feature test error - param is missing or the value is empty: charge 如何在Stripe(Rails)中创建费用和客户 - How to create a charge and a customer in Stripe (Rails) 如果在Rails 3应用程序中不收费,如何禁用Stripe的coffeescript? - How to disable coffeescript for Stripe if no charge in Rails 3 app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM