Creditcard encryption

Can anyone share with us the integration with cybersource.possibly sharing the code or guide us to use builtin service ,if any.
Thing we are looking are ,do we have any api’s in cybersource to call and how?,and how to encrypt the creditcard details etc.
Appreciate any suggestions.Tx in advance.