예제 #1
0
파일: models.py 프로젝트: ojr9/g39
 def create(self):
     # mpu = Saver.objects.get(self.author)
     ba = MangoBankAccount.objects.get(owner=self.saver.mid)
     po = BankWirePayOut(author=self.saver.mid, debited_funds=Money(amount=self.amount, currency=self.currency),
                         debited_wallet=self.dwid, bank_account=ba.bid, bank_wire_ref=self.bank_wire_ref)
     po.save()
     self.poid = po.get_pk()
     # get other stuff from the api call and add accordingly
     self.save()
예제 #2
0
파일: models.py 프로젝트: ojr9/confessapp
 def create(self, user):
     # call the _check here
     mid = MangoUser.objects.get(user=user).mid
     bid = MangoBankAccount.objects.get(mid=mid)
     dwid = MangoWallet.objects.get(mid=mid)
     payout = BankWirePayOut(AuthorId=mid,
                             DebitedFunds=Money(self.amount, self.currency),
                             Fees=Money(self.fees, self.currency),
                             BankAccountId=bid,
                             DebitedWalletId=dwid,
                             BankWireRef=self.reference)
     payout.save()
     self.poid = payout.get_pk()
     self.author_id = mid
     self.bid = bid
     self.dwid = dwid
     self.creation_date = payout['CreationDate']  # is this form ok?
     self.save()