Skip to content

Commit cf05847

Browse files
wit4ermpyrev
authored andcommitted
add card2card payment model
1 parent 5f04810 commit cf05847

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

capitalist/models.py

+18
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,24 @@ def get_payment_args(self):
122122
return [arg for arg in args if arg is not None]
123123

124124

125+
class Card2CardRussianPayment(BasePayment):
126+
__slots__ = ['card_number', 'amount', 'currency', 'internal_id', 'destination']
127+
128+
def __init__(self, card_number, amount, currency, internal_id, destination):
129+
self.card_number = card_number
130+
self.amount = amount
131+
self.currency = currency
132+
self.internal_id = internal_id
133+
self.destination = destination
134+
135+
def get_codename(self):
136+
return 'RUCARDP2P_DYN'
137+
138+
def get_payment_args(self):
139+
args = [self.card_number, self.amount, self.currency, self.internal_id, self.destination]
140+
return [arg for arg in args if arg is not None]
141+
142+
125143
class CardUkrainianPayment(BasePayment):
126144
__slots__ = ['card_number', 'amount', 'currency', 'internal_id', 'destination']
127145

0 commit comments

Comments
 (0)