最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】尝试使用ebay的示例代码ConsoleAddItem去向sandbox中添加发布商品

eBay crifan 3143浏览 0评论

【背景】

继续:

【记录】eBay API的开发流程

中的:

【记录】试试eBay提供的C#的console版的Hello World示例代码

现在去:

继续参考示例代码中的ConsoleAddItem,去向sandbox中添加商品,发布商品。

【折腾过程】

1.继续去先修改ConsoleAddItem的App.config,添加UserAccount.ApiToken:

add ConsoleAddItem api token to app config

2.然后再去调试项目,看看效果。

期间,涉及到:

【整理】ebay中的ConsoleAddItem所涉及到的Return policy/Shipping/Payment的profile Id

3.暂时不深究了。

继续重新调试,不用那个Business policy profiles:

Do you want to use Business policy profiles to list this item? y/n
n

然后看看效果,结果竟然后来出错了:

can not connect to remote ebay sandbox

说是连不上

api.sandbox.ebay.com了。

但是,程序貌似是正常执行了。

后来输出说是成功了:

listing fee is 0 but successfully

但是,listing fee却是0,很奇怪,以为是陈列商品的价格是0呢。

后来感觉估计是:

发布商品的费用,此处是0

对应的,产品有了ID,应该是真的成功了。

4.但是需要想办法,验证一下真的成功了才行。

参考:

C#.NEW 如何使用eBay API SDK刊登商品?

http://sandbox.ebay.com/

搜上述的ID:

110127713838

的确可以看到商品了:

added new item of id 110127713838 info 1

added new item of id 110127713838 info 2

如此:

的确通过sandbox,发布产品成功了。

 

【总结】

ebay的示例代码,的确好用,赞一个。

剩下的,就是抽空,再去自己修改示例代码,

把真正要发布的一个产品的信息,填写进去,最好再弄成函数,供后续调用。

转载请注明:在路上 » 【记录】尝试使用ebay的示例代码ConsoleAddItem去向sandbox中添加发布商品

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
85 queries in 0.165 seconds, using 22.01MB memory