コード例 #1
0
        public static IAPIProfile CreateAPIProfile(string apiUsername, string apiPassword, string signature, string CertificateFile_Sig, string APISignature_Sig, string CertificateFile_Cer, string PrivateKeyPassword_Cer, string stage, string subject, bool is3token, bool isunipay)
        {
            if (is3token == true)
            {
                IAPIProfile profile = ProfileFactory.createSignatureAPIProfile();
                profile.APIUsername  = apiUsername;
                profile.APIPassword  = apiPassword;
                profile.Environment  = stage;
                profile.Subject      = subject;
                profile.APISignature = signature;
                return(profile);
            }
            //else if (Global.isunipay == true)
            else if (isunipay == true)
            {
                IAPIProfile profile = ProfileFactory.createUniPayAPIProfile();
                profile.getFirstPartyEmail = subject;
                profile.Environment        = stage;
                return(profile);
            }
            else
            {
                IAPIProfile profile = ProfileFactory.createSSLAPIProfile();
                profile.APIUsername        = apiUsername;
                profile.APIPassword        = apiPassword;
                profile.Environment        = stage;
                profile.CertificateFile    = CertificateFile_Cer;
                profile.PrivateKeyPassword = PrivateKeyPassword_Cer;
                profile.Subject            = subject;

                return(profile);
            }
        }