Showing
1 changed file
with
8 additions
and
8 deletions
@@ -119,7 +119,7 @@ | @@ -119,7 +119,7 @@ | ||
119 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | 119 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> |
120 | <stringProp name="TestPlan.comments"></stringProp> | 120 | <stringProp name="TestPlan.comments"></stringProp> |
121 | <boolProp name="resetInterpreter">false</boolProp> | 121 | <boolProp name="resetInterpreter">false</boolProp> |
122 | - <stringProp name="parameters">${limit_product_sku} ${limit_product_code} ${limit_product_skn} ${uid_submit}</stringProp> | 122 | + <stringProp name="parameters">${SNCP} ${limit_product_sku} ${limit_product_code} ${limit_product_skn} ${uid_submit}</stringProp> |
123 | <stringProp name="filename"></stringProp> | 123 | <stringProp name="filename"></stringProp> |
124 | <stringProp name="script">import java.security.MessageDigest; | 124 | <stringProp name="script">import java.security.MessageDigest; |
125 | import java.util.Random; | 125 | import java.util.Random; |
@@ -128,8 +128,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb | @@ -128,8 +128,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb | ||
128 | int rd = new Random().nextInt(2); | 128 | int rd = new Random().nextInt(2); |
129 | String clientType = clientTypes[rd]; | 129 | String clientType = clientTypes[rd]; |
130 | String privateKey = privateKeys[rd]; | 130 | String privateKey = privateKeys[rd]; |
131 | -String product_sku_list = "[{\"sku\":"+bsh.args[0]+",\"buy_number\":1,\"type\":\"limitcode\",\"limitproductcode\":\""+bsh.args[1]+"\",\"skn\":"+bsh.args[2]+"}]"; | ||
132 | -String req = "app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&fromPage=iFP_ProductDetail&is_support_apple_pay=N&method=app.Shopping.easyPayment&os_version=10.3.2&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[3]+"&v=7&yoho_bill_term=0&yoho_coin_mode=0"; | 131 | +String product_sku_list = "[{\"sku\":"+bsh.args[1]+",\"buy_number\":1,\"type\":\"limitcode\",\"limitproductcode\":\""+bsh.args[2]+"\",\"skn\":"+bsh.args[3]+"}]"; |
132 | +String req = "_sncp="+bsh.args[0]+"&app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&fromPage=iFP_ProductDetail&is_support_apple_pay=N&method=app.Shopping.easyPayment&os_version=10.3.2&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[4]+"&v=7&yoho_bill_term=0&yoho_coin_mode=0"; | ||
133 | MessageDigest md = MessageDigest.getInstance("MD5"); | 133 | MessageDigest md = MessageDigest.getInstance("MD5"); |
134 | byte[] btInput = req.getBytes(); | 134 | byte[] btInput = req.getBytes(); |
135 | md.update(btInput); | 135 | md.update(btInput); |
@@ -144,7 +144,7 @@ for(byte b : btResult){ | @@ -144,7 +144,7 @@ for(byte b : btResult){ | ||
144 | } | 144 | } |
145 | String md5 = sb.toString(); | 145 | String md5 = sb.toString(); |
146 | product_sku_list=URLEncoder.encode(product_sku_list); | 146 | product_sku_list=URLEncoder.encode(product_sku_list); |
147 | -req = "app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&fromPage=iFP_ProductDetail&is_support_apple_pay=N&method=app.Shopping.easyPayment&os_version=10.3.2&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[3]+"&v=7&yoho_bill_term=0&yoho_coin_mode=0"; | 147 | +req = "_sncp="+bsh.args[0]+"&app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&fromPage=iFP_ProductDetail&is_support_apple_pay=N&method=app.Shopping.easyPayment&os_version=10.3.2&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[4]+"&v=7&yoho_bill_term=0&yoho_coin_mode=0"; |
148 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | 148 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> |
149 | </BeanShellPreProcessor> | 149 | </BeanShellPreProcessor> |
150 | <hashTree/> | 150 | <hashTree/> |
@@ -217,7 +217,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | @@ -217,7 +217,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | ||
217 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | 217 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> |
218 | <stringProp name="TestPlan.comments"></stringProp> | 218 | <stringProp name="TestPlan.comments"></stringProp> |
219 | <boolProp name="resetInterpreter">false</boolProp> | 219 | <boolProp name="resetInterpreter">false</boolProp> |
220 | - <stringProp name="parameters">${limit_product_sku} ${limit_product_code} ${limit_product_skn} ${uid_submit}</stringProp> | 220 | + <stringProp name="parameters">${SNCP} ${limit_product_sku} ${limit_product_code} ${limit_product_skn} ${uid_submit}</stringProp> |
221 | <stringProp name="filename"></stringProp> | 221 | <stringProp name="filename"></stringProp> |
222 | <stringProp name="script">import java.security.MessageDigest; | 222 | <stringProp name="script">import java.security.MessageDigest; |
223 | import java.util.Random; | 223 | import java.util.Random; |
@@ -226,8 +226,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb | @@ -226,8 +226,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb | ||
226 | int rd = new Random().nextInt(2); | 226 | int rd = new Random().nextInt(2); |
227 | String clientType = clientTypes[rd]; | 227 | String clientType = clientTypes[rd]; |
228 | String privateKey = privateKeys[rd]; | 228 | String privateKey = privateKeys[rd]; |
229 | -String product_sku_list = "[{\"sku\":"+bsh.args[0]+",\"buy_number\":1,\"type\":\"limitcode\",\"limitproductcode\":\""+bsh.args[1]+"\",\"skn\":"+bsh.args[2]+"}]"; | ||
230 | -String req = "app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&delivery_way=2&fromPage=iFP_Payment&method=app.Shopping.easyCompute&os_version=10.3.2&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[3]+"&v=7&yoho_bill_term=0"; | 229 | +String product_sku_list = "[{\"sku\":"+bsh.args[1]+",\"buy_number\":1,\"type\":\"limitcode\",\"limitproductcode\":\""+bsh.args[2]+"\",\"skn\":"+bsh.args[3]+"}]"; |
230 | +String req = "_sncp="+bsh.args[0]+"&app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&delivery_way=2&fromPage=iFP_Payment&method=app.Shopping.easyCompute&os_version=10.3.2&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[4]+"&v=7&yoho_bill_term=0"; | ||
231 | MessageDigest md = MessageDigest.getInstance("MD5"); | 231 | MessageDigest md = MessageDigest.getInstance("MD5"); |
232 | byte[] btInput = req.getBytes(); | 232 | byte[] btInput = req.getBytes(); |
233 | md.update(btInput); | 233 | md.update(btInput); |
@@ -242,7 +242,7 @@ for(byte b : btResult){ | @@ -242,7 +242,7 @@ for(byte b : btResult){ | ||
242 | } | 242 | } |
243 | String md5 = sb.toString(); | 243 | String md5 = sb.toString(); |
244 | product_sku_list=URLEncoder.encode(product_sku_list); | 244 | product_sku_list=URLEncoder.encode(product_sku_list); |
245 | -req = "app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&delivery_way=2&fromPage=iFP_Payment&method=app.Shopping.easyCompute&os_version=10.3.2&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[3]+"&v=7&yoho_bill_term=0"; | 245 | +req = "_sncp="+bsh.args[0]+"&app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&delivery_way=2&fromPage=iFP_Payment&method=app.Shopping.easyCompute&os_version=10.3.2&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[4]+"&v=7&yoho_bill_term=0"; |
246 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | 246 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> |
247 | </BeanShellPreProcessor> | 247 | </BeanShellPreProcessor> |
248 | <hashTree/> | 248 | <hashTree/> |
-
Please register or login to post a comment