The easiest way to use the CIM support is to use the
CustomerPaymentProfile models provided by the
authorizenet app. These
models map the ORM CRUD operations to Authorize.NET calls, making it easy to
keep your local and remote data in sync.
Customer profiles contain a one-to-one field
customer which links to the
Django user model by default. This foreign key target may be customized in the
CUSTOMER_MODEL setting in your settings module.
Using built-in models¶
save() method is called on a
the payment profile is created or update on Authorize.NET and saved to the
CustomerProfile will also be created if the specified
customer doesn’t have one yet.
delete() method is called on a
instance, the payment profile is deleted on Authorize.NET and deleted from the
Payment Profile Form¶
CustomerPaymentForm available in
authorizenet.forms allows a
CustomerPaymentProfile to be easily created or updated for a given
customer. This form is just a model form for the
CustomerPaymentProfile instances can be created and updated with ease.
customer argument sent to
CustomerPaymentForm defaults to the
currently authenticated user.