File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from authorizenet import apicontractsv1
2+ from authorizenet .apicontrollers import *
3+
4+ merchantAuth = apicontractsv1 .merchantAuthenticationType ()
5+ merchantAuth .name = '5KP3u95bQpv'
6+ merchantAuth .transactionKey = '4Ktq966gC55GAX7S'
7+
8+ updateCustomerProfile = apicontractsv1 .updateCustomerProfileRequest ()
9+ updateCustomerProfile .merchantAuthentication = merchantAuth
10+ updateCustomerProfile .profile = apicontractsv1 .customerProfileExType ()
11+
12+ updateCustomerProfile .profile .customerProfileId = "36152115"
13+ updateCustomerProfile .profile .merchantCustomerId = "mycustomer"
14+ updateCustomerProfile .profile .description = "john doe"
15+ updateCustomerProfile .profile .email = "email@email.com"
16+
17+ updateCustomerProfileController = updateCustomerProfileController (updateCustomerProfile )
18+ updateCustomerProfileController .execute ()
19+
20+ response = updateCustomerProfileController .getresponse ()
21+
22+ if (response .messages .resultCode == "Ok" ):
23+ print "Successfully updated customer with customer profile id %s" % updateCustomerProfile .profile .customerProfileId
24+ else :
25+ print response .messages .message [0 ].text
26+ print "Failed to update customer profile with customer profile id %s" % updateCustomerProfile .profile .customerProfileId
You can’t perform that action at this time.
0 commit comments