本文整理汇总了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)
示例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)
示例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)