当前位置: 首页>>代码示例>>Python>>正文


Python Order.orderVerificationCode方法代码示例

本文整理汇总了Python中models.order.Order.orderVerificationCode方法的典型用法代码示例。如果您正苦于以下问题:Python Order.orderVerificationCode方法的具体用法?Python Order.orderVerificationCode怎么用?Python Order.orderVerificationCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在models.order.Order的用法示例。


在下文中一共展示了Order.orderVerificationCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ProcessOrder

# 需要导入模块: from models.order import Order [as 别名]
# 或者: from models.order.Order import orderVerificationCode [as 别名]

#.........这里部分代码省略.........
                    # logging.debug("No gold match")
                    tGoldAmount = ""

        tOrder.orderQuantity = NumberToGp.ConvertBetToInt(tGoldAmount)
        tOrder.orderSimpleGoldAmount = tGoldAmount
        tOrder.orderFormEmail = tEmail
        tOrder.orderAccountName = tRsName
        tOrder.orderMobileNumber = tMobilePhone
        tOrder.orderPromotionalCode = tPromotionCode.lower()
        tOrder.orderIp = tOrderIp
        if tMembers == "yes":
            tOrder.orderCustomerIsMember = True
        else:
            tOrder.orderCustomerIsMember = False

        # Paypal Info
        tOrder.orderTransactionId = tTransactionId

        tOrder.orderPaypalFirstName = tCustomerFirstName
        tOrder.orderPaypalLastName = tCustomerLastName

        tOrder.orderCost = float(tArgumentDic["payment_gross"])
        tOrder.orderCustomerPaypalId = tArgumentDic["payer_id"]
        tOrder.orderPaypalEmail = str(tPaypalEmail).lower()

        tAssignedAgentNick = tPaypalOrder.GetAssignedAgent(tOrder)
        tOrder.orderAssignedAgent = tAssignedAgentNick
        # logging.debug("Order assigned to agent: " + str(tAssignedAgentNick))

        tOrder.orderReferralCode = tReferCode

        tOrder.orderDeliver = "False"

        if tOrder.orderVerificationCode == None or tOrder.orderVerificationCode == "":
            tOrder.orderVerificationCode = re.sub(r"\W", "", str(uuid.uuid4())).lower()

        tCurrentEocPrices = PriceContainer.GetCurrentPriceDic()
        tCurrent07Prices = PriceContainer.GetCurrentPriceDic07()

        tSkip07 = False
        if tOrder.orderSimpleGoldAmount in tCurrentEocPrices.keys():
            if str(tOrder.orderCost) == str(tCurrentEocPrices[tOrder.orderSimpleGoldAmount]):
                tOrder.orderGoldType = "eoc"
                tSkip07 = True

        if not tSkip07:
            if tOrder.orderSimpleGoldAmount in tCurrent07Prices.keys():
                if str(tOrder.orderCost) == str(tCurrent07Prices[tOrder.orderSimpleGoldAmount]):
                    tOrder.orderGoldType = "07"

        tOrderKey = str(tOrder.put())

        # logging.debug("Order Saved: " + str(tOrderKey))

        taskqueue.add(url="/iplookup", countdown=1, params={"ip": tOrderIp, "transid": tTransactionId})

        tUsedBonus = []
        tCustomerList = tCustomerHandler.GetCustomerByPpid(tOrder.orderCustomerPaypalId)
        if len(tCustomerList) == 1:
            tCustomer = tCustomerList[0]
            tIpList = tCustomer.customerIpAddresses
            tIpList.append(tOrderIp)
            tCustomer.customerIpAddresses = tIpList

            tOrderList = tCustomer.customerOrders
            tOrderList.append(tOrderKey)
开发者ID:Kenneth-Posey,项目名称:kens-old-projects,代码行数:70,代码来源:paypal.py


注:本文中的models.order.Order.orderVerificationCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。