public static string Execute(CancelTokenRequest request, Options options) { string hash = CreateSignature(request, options.SecretKey); var url = options.Url + request.TOKEN + "?merchant=" + request.MERCHANT + "×tamp=" + request.TIMESTAMP + "&signature=" + hash + "&cancelReason=" + request.CANCELREASON; return(HttpCaller.GetDataToUrl(url)); }
public static string Execute(BinV1Request request, Options options) { var hashString = CreateHashString(request, options.SecretKey); string createUrl = options.Url + request.BIN + "?" + hashString; return(HttpCaller.GetDataToUrl(createUrl)); }
public static string Execute(GetTokenInformationRequest request, Options options) { string hash = CreateSignature(request, options.SecretKey); var url = options.Url + request.TOKEN + "?merchant=" + request.MERCHANT + "×tamp=" + request.TIMESTAMP + "&signature=" + hash; //secure.payu.com.tr/order/token/v2/merchantToken/b7e5d8649c9e2e75726b59c56c29e91d?merchant=CC921×tamp=1428046996&signature=34b084915a67bf2b54eff4a29e677c2718e26a6632496bfb4c5880a5d938b96e return(HttpCaller.GetDataToUrl(url)); }
public static string Execute(TokenHistoryRequest request, Options options) { string hash = CreateSignature(request, options.SecretKey); var url = options.Url + request.TOKEN + "/history" + "?merchant=" + request.MERCHANT + "×tamp=" + request.TIMESTAMP + "&signature=" + hash; return(HttpCaller.GetDataToUrl(url)); }
public static string Execute(ReportRequest request, Options options) { var hashString = CreateHashString(request, options.SecretKey); string url = options.Url + "?" + hashString; return(HttpCaller.GetDataToUrl(url)); }
public async Task <IActionResult> Pause() { HttpStatusCode status = await HttpCaller.Put(_spotifyAPISettings.SpotifyUrl + "/pause?device_id=" + _spotifyAPISettings.DeviceID, _spotifyAPISettings.AccessToken, null); return(StatusCode((int)status)); }
public async Task <ActionResult <SpotifyReply> > Get() { Player player = await HttpCaller.Get <Player>(_spotifyAPISettings.SpotifyUrl, _spotifyAPISettings.AccessToken); SpotifyReply spotifyReply = player.ToSpotifyReply(); return(Ok(spotifyReply)); }
public async Task <IActionResult> Get(int volume) { HttpStatusCode status = await HttpCaller.Put(_spotifyAPISettings.SpotifyUrl + "/volume" + "?volume_percent=" + volume + "&device_id=" + _spotifyAPISettings.DeviceID, _spotifyAPISettings.AccessToken, null); return(StatusCode((int)status)); }
public async Task <ActionResult <SpotifyReply> > Previous() { HttpStatusCode status = await HttpCaller.Post(_spotifyAPISettings.SpotifyUrl + "/previous?device_id=" + _spotifyAPISettings.DeviceID, _spotifyAPISettings.AccessToken, null); Player player = await HttpCaller.Get <Player>(_spotifyAPISettings.SpotifyUrl, _spotifyAPISettings.AccessToken); SpotifyReply spotifyReply = player.ToSpotifyReply(); return(Ok(spotifyReply)); }
public static string Execute(MultipleTokenRequest request, Options options) { string hash = CreateSignature(request, options.SecretKey); int i = 0; string tokenString = string.Empty; foreach (var item in request.TOKENS) { tokenString += "&tokens[" + i + "]=" + item.TOKEN; i++; } tokenString = tokenString.Substring(1); string url = options.Url + "merchantToken?" + tokenString + "&merchant=" + request.MERCHANT + "×tamp=" + request.TIMESTAMP + "&signature=" + hash; return(HttpCaller.GetDataToUrl(url)); }
public void Setup() { _Caller = new HttpCaller(); }
public static PointCheckResponse Execute(PointCheckWithTokenRequest request, Options options) { var hashString = CreateHashString(request, options.SecretKey); return(HttpCaller.Create().PostData <PointCheckResponse>(options.Url, hashString)); }
public static string Execute(ConfirmationRequest request, Options options) { var hashString = CreateHashString(request, options.SecretKey); return(HttpCaller.PostDataReturnString(options.Url, hashString)); }
public SpotifyApi(HttpCaller httpCaller) { _httpCaller = httpCaller; }
public static ApiPayment3DResponse ThreeDSecurePayment(ApiPaymentRequest request, Options options) { var hashString = CreateHashString(request, options.SecretKey); return(HttpCaller.Create().PostData <ApiPayment3DResponse>(options.Url, hashString)); }
public static IOSResponse Execute(IOSRequest request, Options options) { var hashString = CreateHashString(request, options.SecretKey); return(HttpCaller.Create().PostData <IOSResponse>(options.Url, hashString)); }
public static string Execute(BinV2Request request, Options options) { var nameValueCollection = CreateHashString(request, options.SecretKey); return(HttpCaller.PostDataArrayReturnString(options.Url, nameValueCollection)); }
public VolumeController(IOptions <SpotifyAPISettings> spotifyApiSettings, HttpCaller httpCaller) { _spotifyAPISettings = spotifyApiSettings.Value; _httpCaller = httpCaller; }
public static string Execute(TokenServiceCreateTokenRequest request, Options options) { var nameValueCollection = CreatePostDataArray(request, options.SecretKey); return(HttpCaller.PostDataArrayReturnString(options.Url, nameValueCollection)); }