Exemple #1
0
 def profile(self, profile):
     if isinstance(profile, Profile):
         self.__dict__['profile'] = profile
     else:
         p = Profile(profile)
         self.__dict__['profile'] = p
Exemple #2
0
optimal_obj = PaysafeApiClient(Config.api_key, Config.api_password,
                               Config.environment, Config.account_number)
standalone_Obj = StandaloneCredits(None)
standalone_Obj.merchantRefNum(RandomTokenGenerator().generateToken())
standalone_Obj.amount(100.98 * Config.currency_base_units_multiplier)
standalone_Obj.customerIp("192.0.126.111")

achbank_Obj = ACHBankAccount(None)
achbank_Obj.accountHolderName("XYZ Company")
achbank_Obj.accountType("CHECKING")
achbank_Obj.accountNumber("988758392")
achbank_Obj.routingNumber("211589828")
achbank_Obj.payMethod("PPD")

profile_Obj = Profile(None)
profile_Obj.firstName("Joe")
profile_Obj.lastName("Smith")
profile_Obj.email("*****@*****.**")

billingdetails_Obj = BillingDetails(None)
billingdetails_Obj.street("100 Queen Street West")
billingdetails_Obj.city("Los Angeles")
billingdetails_Obj.state("CA")
billingdetails_Obj.country("US")
billingdetails_Obj.zip("90210")
billingdetails_Obj.phone("3102649010")

standalone_Obj.profile(profile_Obj)
standalone_Obj.billingDetails(billingdetails_Obj)
standalone_Obj.ach(achbank_Obj)
Exemple #3
0
@author: Asawari.Vaidya
'''
from PythonPaysafeSDK.CustomerVault.Addresses import Address
from PythonPaysafeSDK.CustomerVault.EFTBankAccount import EFTBankAccount
from PythonPaysafeSDK.CustomerVault.Profile import Profile
from PythonPaysafeSDK.PaysafeApiClient import PaysafeApiClient
from utils.Utils import Utils

from Config import Config
from RandomTokenGenerator import RandomTokenGenerator

optimal_obj = PaysafeApiClient(Config.api_key, Config.api_password,
                               Config.environment, Config.account_number)

# Create Customer Profile
profile_obj = Profile(None)
profile_obj.merchantCustomerId(RandomTokenGenerator().generateToken())
profile_obj.locale("en_US")
profile_obj.firstName("John")
profile_obj.lastName("Smith")
profile_obj.email("*****@*****.**")
profile_obj.phone("713-444-5555")

response_object = optimal_obj.customer_vault_service_handler().create_profile(
    profile_obj)

# Create Address
address_obj = Address(None)
address_obj.nickName("home")
address_obj.street("100 Queen Street West")
address_obj.street2("Unit 201")