Browse Source

加入global_id

ANX 7 years ago
parent
commit
42a4a92036
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/ebaytr.rb

+ 2 - 0
lib/ebaytr.rb

@@ -13,6 +13,7 @@ module Ebaytr
   @@url = "https://api.sandbox.ebay.com/ws/api.dll"
   @@api = "967"
   @@site = "0"
+  @@global_id = "EBAY-US"
 
   def self.trading(request_name,hash = {})
     url = URI.parse(@@url)
@@ -59,6 +60,7 @@ module Ebaytr
     req = Net::HTTP::Post.new(url.path)
     req.add_field("X-EBAY-SOA-SECURITY-APPNAME", @@app_name)
     req.add_field("X-EBAY-SOA-OPERATION-NAME", request_name)
+    req.add_field("X-EBAY-SOA-GLOBAL-ID", @@global_id)
 
     body = Gyoku.xml(hash)