[英]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.