parameters: (self, product_id)
return_statement: return url_str
docstring: 生成QR URL
  
          即微信支付模式一, 预生成一个QR, 用户扫描后, 微信会调用在微信平台上配置的回调URL
docstring_summary: 生成QR URL
docstring_tokens: 生成QR URL
function: def _generate_qr_url(self, product_id):
          '''
          生成QR URL
  
          即微信支付模式一, 预生成一个QR, 用户扫描后, 微信会调用在微信平台上配置的回调URL
          '''
          url_dict = {
              'appid': self.appid,
              'mch_id': self.mch_id,
              'nonce_str': self.generate_nonce_str(),
              'product_id': str(product_id),
              'time_stamp': str(int(time.time())),
          }
          url_dict['sign'] = self.generate_sign(url_dict)
          url_str = self.URL_QR % urlencode(url_dict).encode("utf-8")
          return url_str
function_tokens: def _generate_qr_url ( self , product_id ) : url_dict = { 'appid' : self . appid , 'mch_id' : self . mch_id , 'nonce_str' : self . generate_nonce_str ( ) , 'product_id' : str ( product_id ) , 'time_stamp' : str ( int ( time . time ( ) ) ) , } url_dict [ 'sign' ] = self . generate_sign ( url_dict ) url_str = self . URL_QR % urlencode ( url_dict ) . encode ( "utf-8" ) return url_str