本文整理匯總了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)