Skip to content

Commit 026c59c

Browse files
committed
Sample code for delete customer profile
Adds sample code to delete customer profile. Signed-off-by: Srijan Misra <[email protected]>
1 parent a3729da commit 026c59c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
deleteCustomerProfile = apicontractsv1.deleteCustomerProfileRequest()
9+
deleteCustomerProfile.merchantAuthentication = merchantAuth
10+
deleteCustomerProfile.customerProfileId = "36152115"
11+
12+
deleteCustomerProfileController = deleteCustomerProfileController(deleteCustomerProfile)
13+
deleteCustomerProfileController.execute()
14+
15+
response = deleteCustomerProfileController.getresponse()
16+
17+
if (response.messages.resultCode=="Ok"):
18+
print "Successfully deleted customer with customer profile id %s" % deleteCustomerProfile.customerProfileId
19+
else:
20+
print response.messages.message[0].text
21+
print "Failed to delete customer profile with customer profile id %s" % deleteCustomerProfile.customerProfileId

0 commit comments

Comments
 (0)