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


Python PayPalIPN.invoice方法代码示例

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


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

示例1: test_handler_sends_email

# 需要导入模块: from paypal.standard.ipn.models import PayPalIPN [as 别名]
# 或者: from paypal.standard.ipn.models.PayPalIPN import invoice [as 别名]
 def test_handler_sends_email(self):
     ipn = PayPalIPN()
     ipn.invoice = str(self.user_order.id)
     payment_was_successful.send(sender=ipn)
     message = self.email_message % dict(
         order_number=self.user_order.id,
         total=UserOrder.objects.get(id=self.user_order.id).total,
     )
     self.__class__.send_mail.assert_called_once_with(
         'Your UCBC Order #%d' % self.user_order.id,
         message,
         settings.ORDER_FROM_EMAIL,
         [self.user.email, settings.ORDER_FROM_EMAIL],
         fail_silently=True,
         auth_user=settings.ORDER_EMAIL_HOST_USER,
         auth_password=settings.ORDER_EMAIL_HOST_PASSWORD,
     )
开发者ID:gkampjes,项目名称:ucbc,代码行数:19,代码来源:test_signals.py

示例2: test_payment_was_successful_handler_user_order_doesnt_exist

# 需要导入模块: from paypal.standard.ipn.models import PayPalIPN [as 别名]
# 或者: from paypal.standard.ipn.models.PayPalIPN import invoice [as 别名]
 def test_payment_was_successful_handler_user_order_doesnt_exist(self, getLogger):
     log = getLogger()
     ipn = PayPalIPN()
     ipn.invoice = "5"
     payment_was_successful.send(sender=ipn)
     log.error.assert_called_once_with("No UserOrder with id: %d" % 5)
开发者ID:gkampjes,项目名称:ucbc,代码行数:8,代码来源:test_signals.py

示例3: test_handler_flags_user_order_as_paid

# 需要导入模块: from paypal.standard.ipn.models import PayPalIPN [as 别名]
# 或者: from paypal.standard.ipn.models.PayPalIPN import invoice [as 别名]
 def test_handler_flags_user_order_as_paid(self):
     ipn = PayPalIPN()
     ipn.invoice = str(self.user_order.id)
     payment_was_successful.send(sender=ipn)
     self.assert_order_paid()
开发者ID:gkampjes,项目名称:ucbc,代码行数:7,代码来源:test_signals.py


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