File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ from authorizenet import apicontractsv1
2+ from authorizenet .apicontrollers import *
3+ import random
4+
5+ merchantAuth = apicontractsv1 .merchantAuthenticationType ()
6+ merchantAuth .name = '5KP3u95bQpv'
7+ merchantAuth .transactionKey = '4Ktq966gC55GAX7S'
8+
9+
10+ createCustomerProfile = apicontractsv1 .createCustomerProfileRequest ()
11+ createCustomerProfile .merchantAuthentication = merchantAuth
12+ createCustomerProfile .
profile = apicontractsv1 .
customerProfileType (
'jdoe' + str (
random .
randint (
0 ,
10000 )),
'John2 Doe' ,
'[email protected] ' )
13+
14+ createCustomerProfileController = createCustomerProfileController (createCustomerProfile )
15+ createCustomerProfileController .execute ()
16+
17+ response = createCustomerProfileController .getresponse ()
18+
19+ if (response .messages .resultCode == "Ok" ):
20+ print "Successfully created a customer profile with id: %s" % response .customerProfileId
21+ else :
22+ print "Failed to create customer payment profile %s" % response .messages .message [0 ].text
You can’t perform that action at this time.
0 commit comments