I keep getting a null exception at the ; below. The ApiUsername & ApiPassword have values so I don't undestand if I just set this up wrong or what. The Credentials property is a certain type which has the Username and Password properties that need to be set.
So I have the auto-propery defined: public CustomSecurityHeaderType SoapCallCredentials { get; private set; }
Then whenever this is hit, I get a null exception and can't figure out why.
private void SetApiCredentials()
{
SoapCallCredentials = new CustomSecurityHeaderType
{
Credentials =
{
Username = PayPalConfig.CurrentConfiguration.ApiUserName,
Password = PayPalConfig.CurrentConfiguration.ApiPassword
}
};
UrlEndPoint = PayPalConfig.CurrentConfiguration.ExpressCheckoutSoapApiEndPoint;
}