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


Python PayIn.CreditedUserId方法代码示例

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


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

示例1: create

# 需要导入模块: from mangopaysdk.entities.payin import PayIn [as 别名]
# 或者: from mangopaysdk.entities.payin.PayIn import CreditedUserId [as 别名]
    def create(self, debited_funds, fees=None, secure_mode_return_url=None):
        pay_in = PayIn()
        pay_in.AuthorId = self.mangopay_user.mangopay_id
        pay_in.CreditedUserId = self.mangopay_wallet.mangopay_user.mangopay_id
        pay_in.CreditedWalletId = self.mangopay_wallet.mangopay_id
        pay_in.DebitedFunds = python_money_to_mangopay_money(debited_funds)
        if not fees:
            fees = PythonMoney(0, debited_funds.currency)
        pay_in.Fees = python_money_to_mangopay_money(fees)

        payment_details = PayInPaymentDetailsCard()
        payment_details.CardType = "CB_VISA_MASTERCARD"
        pay_in.PaymentDetails = payment_details

        execution_details = PayInExecutionDetailsDirect()
        execution_details.CardId = self.mangopay_card.mangopay_id
        execution_details.SecureModeReturnURL = secure_mode_return_url
        execution_details.SecureMode = "DEFAULT"
        pay_in.ExecutionDetails = execution_details

        client = get_mangopay_api_client()
        created_pay_in = client.payIns.Create(pay_in)

        self.mangopay_id = created_pay_in.Id
        self._update(created_pay_in)
开发者ID:bsvetchine,项目名称:django-mangopay,代码行数:27,代码来源:models.py

示例2: create

# 需要导入模块: from mangopaysdk.entities.payin import PayIn [as 别名]
# 或者: from mangopaysdk.entities.payin.PayIn import CreditedUserId [as 别名]
 def create(self, tag=None):
     pay_in = PayIn()
     pay_in.Tag = tag
     pay_in.AuthorId = self.mangopay_user.mangopay_id
     pay_in.CreditedUserId = self.mangopay_user.mangopay_id
     pay_in.CreditedWalletId = self.mangopay_wallet.mangopay_id
     pay_in.DebitedFunds = python_money_to_mangopay_money(
         self.debited_funds)
     pay_in.Fees = python_money_to_mangopay_money(self.fees)
     pay_in.PaymentDetails = self._get_payment_details()
     pay_in.ExecutionDetails = self._get_execution_details()
     client = get_mangopay_api_client()
     created_pay_in = client.payIns.Create(pay_in)
     self.mangopay_id = created_pay_in.Id
     self._update(created_pay_in)
开发者ID:webu,项目名称:django-mangopay,代码行数:17,代码来源:models.py

示例3: getJohnsPayInCardWeb

# 需要导入模块: from mangopaysdk.entities.payin import PayIn [as 别名]
# 或者: from mangopaysdk.entities.payin.PayIn import CreditedUserId [as 别名]
 def getJohnsPayInCardWeb(self):
     """Creates Pay-In Card Web object"""       
     wallet = self.getJohnsWallet()
     user = self.getJohn()
         
     payIn = PayIn()
     payIn.AuthorId = user.Id
     payIn.CreditedUserId = user.Id
     payIn.DebitedFunds = Money()
     payIn.DebitedFunds.Currency = 'EUR'
     payIn.DebitedFunds.Amount = 1000
     payIn.Fees = Money()
     payIn.Fees.Currency = 'EUR'
     payIn.Fees.Amount = 5
     payIn.CreditedWalletId = wallet.Id
     payIn.PaymentDetails = self.getPayInPaymentDetailsCard()
     payIn.ExecutionDetails = self.getPayInExecutionDetailsWeb()
     return self.sdk.payIns.Create(payIn)
开发者ID:Kmaschta,项目名称:mangopay2-python-sdk,代码行数:20,代码来源:testbase.py


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