Пример #1
0
 def Get(self, card_registration_id):
         card_registration = CardRegistration(card_registration_id)
         card_registration.RegistrationData = "data=RegistrationData"
         card_registration.PreregistrationData = "PreregistrationData"
         card_registration.AccessKey = "AccessKey"
         card_registration.CardRegistrationURL = "CardRegistrationURL"
         return card_registration
Пример #2
0
def create_card(mangopay_user_id):
    cr = CardRegistration()
    cr.UserId = mangopay_user_id
    cr.Currency = 'EUR'
    cr.CardType = 'CB_VISA_MASTERCARD'
    cr.save()
    data = dict(
        accessKeyRef=cr.AccessKey,
        cardNumber='3569990000000132',
        cardExpirationDate='1234',
        cardCvx='123',
        data=cr.PreregistrationData,
    )
    cr.RegistrationData = requests.post(cr.CardRegistrationURL, data).text
    cr.save()
    return cr
Пример #3
0
def create_card(mangopay_user_id):
    cr = CardRegistration()
    cr.UserId = mangopay_user_id
    cr.Currency = 'EUR'
    cr.CardType = 'CB_VISA_MASTERCARD'
    cr.save()
    data = dict(
        accessKeyRef=cr.AccessKey,
        cardNumber='3569990000000132',
        cardExpirationDate='1234',
        cardCvx='123',
        data=cr.PreregistrationData,
    )
    cr.RegistrationData = requests.post(cr.CardRegistrationURL, data).text
    cr.save()
    return cr
Пример #4
0
    cls.janet_id = make_mangopay_account('Janet')
    cls.janet_wallet_id = make_wallet(cls.janet_id).Id
    cr = CardRegistration()
    cr.UserId = cls.janet_id
    cr.Currency = 'EUR'
    cr.CardType = 'CB_VISA_MASTERCARD'
    cr.save()
    data = dict(
        accessKeyRef=cr.AccessKey,
        cardNumber='3569990000000132',
        cardExpirationDate='1234',
        cardCvx='123',
        data=cr.PreregistrationData,
    )
    cr.RegistrationData = requests.post(cr.CardRegistrationURL, data).text
    cr.save()
    cls.card_id = cr.CardId
    del cr, data

    cls.homer_id = make_mangopay_account('Homer')
    cls.homer_wallet_id = make_wallet(cls.homer_id).Id
    ba = BankAccount(user_id=cls.homer_id, type='IBAN')
    ba.OwnerName = 'Homer Jay'
    ba.OwnerAddress = {
        'AddressLine1': 'Somewhere',
        'City': 'The City of Light',
        'PostalCode': '75001',
        'Country': 'FR',
    }
    ba.IBAN = 'FR1420041010050500013M02606'