protected void Page_Load(object sender, EventArgs e) { access_token = Request.QueryString["access_token"]; access_token_text.InnerHtml = access_token; clientConfig = new AmazonPay.CommonRequests.Configuration(); clientConfig.WithAccessKey(ConfigurationManager.AppSettings["access_key"]) .WithSecretKey(ConfigurationManager.AppSettings["secret_key"]) .WithMerchantId(ConfigurationManager.AppSettings["merchant_id"]) .WithClientId(ConfigurationManager.AppSettings["lwa_client_id"]) .WithSandbox(true) .WithRegion(Regions.supportedRegions.us); client = new Client(clientConfig); Session.Add("PayWithAmazon_clientObj", client); }
public ActionResult AddressAndWallet() { access_token = Request.QueryString["access_token"]; clientConfig = new AmazonPay.CommonRequests.Configuration(); clientConfig.WithAccessKey(ConfigurationManager.AppSettings["AccessKey"].ToString()) .WithSecretKey(ConfigurationManager.AppSettings["SecretKey"].ToString()) .WithMerchantId(ConfigurationManager.AppSettings["MerchantId"].ToString()) .WithClientId(ConfigurationManager.AppSettings["ClientId"].ToString()) .WithSandbox(true) .WithRegion(Regions.supportedRegions.us) .WithCurrencyCode(Regions.currencyCode.USD); client = new Client(clientConfig); Session.Add("ClientObject", client); return(View()); }