當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。