/// <remarks/> public void createRecurrentPaymentAsync(ERecurrenceRequest recurrenceRequest, object userState) { if ((this.createRecurrentPaymentOperationCompleted == null)) { this.createRecurrentPaymentOperationCompleted = new System.Threading.SendOrPostCallback(this.OncreateRecurrentPaymentOperationCompleted); } this.InvokeAsync("createRecurrentPayment", new object[] { recurrenceRequest}, this.createRecurrentPaymentOperationCompleted, userState); }
/// <remarks/> public void createRecurrentPaymentAsync(ERecurrenceRequest recurrenceRequest) { this.createRecurrentPaymentAsync(recurrenceRequest, null); }
/// <remarks/> public System.IAsyncResult BegincreateRecurrentPayment(ERecurrenceRequest recurrenceRequest, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("createRecurrentPayment", new object[] { recurrenceRequest}, callback, asyncState); }
public EPaymentStatus createRecurrentPayment(ERecurrenceRequest recurrenceRequest) { object[] results = this.Invoke("createRecurrentPayment", new object[] { recurrenceRequest}); return ((EPaymentStatus)(results[0])); }
/// <summary> /// Založení opakovane platby /// </summary> /// /// <param name="parentPaymentSessionId">identifikator rodicovske platby</param> /// <param name="recurrentPaymentOrderNumber">identifikator objednavky</param> /// <param name="recurrentPaymentTotalPriceInCents">celkova cena v halerich</param> /// <param name="recurrentPaymentCurrency">mena, ve ktere platba probiha</param> /// <param name="recurrentPaymentProductName">popis objednavky zobrazujici se na platebni brane</param> /// <param name="targetGoId">identifikator prijemnce - GoId</param> /// <param name="secureKey">kryptovaci klic prideleny GoPay</param> /// /// <returns>paymentSessionId</returns> public static long PerformRecurrence( long parentPaymentSessionId, string recurrentPaymentOrderNumber, long recurrentPaymentTotalPriceInCents, string recurrentPaymentCurrency, string recurrentPaymentProductName, long targetGoId, string secureKey) { try { // Inicializace providera pro WS AxisEPaymentProviderV2Service provider = new AxisEPaymentProviderV2Service(GopayConfig.Ws); EPaymentStatus paymentStatus; string encryptedSignature = GopayHelper.Encrypt( GopayHelper.Hash( GopayHelper.ConcatRecurrenceRequest( parentPaymentSessionId, recurrentPaymentOrderNumber, recurrentPaymentTotalPriceInCents, targetGoId, secureKey) ), secureKey); ERecurrenceRequest recurrenceRequest = new ERecurrenceRequest(); recurrenceRequest.parentPaymentSessionId = parentPaymentSessionId; recurrenceRequest.orderNumber = recurrentPaymentOrderNumber; recurrenceRequest.totalPrice = recurrentPaymentTotalPriceInCents; recurrenceRequest.targetGoId = targetGoId; recurrenceRequest.encryptedSignature = encryptedSignature; paymentStatus = provider.createRecurrentPayment(recurrenceRequest); if (paymentStatus.result == GopayHelper.CALL_COMPLETED) { GopayHelper.CheckPaymentStatus( paymentStatus, GopayHelper.SessionState.CREATED.ToString(), targetGoId, recurrentPaymentOrderNumber, recurrentPaymentTotalPriceInCents, recurrentPaymentCurrency, recurrentPaymentProductName, secureKey); return (long)paymentStatus.paymentSessionId; } else { throw new GopayException("Bad payment status"); } } catch (Exception ex) { // // Chyba pri komunikaci s WS // throw new GopayException(ex.ToString()); } }
/// <summary> /// Založení opakovane platby /// </summary> /// /// <param name="parentPaymentSessionId">identifikator rodicovske platby</param> /// <param name="recurrentPaymentOrderNumber">identifikator objednavky</param> /// <param name="recurrentPaymentTotalPriceInCents">celkova cena v halerich</param> /// <param name="recurrentPaymentCurrency">mena, ve ktere platba probiha</param> /// <param name="recurrentPaymentProductName">popis objednavky zobrazujici se na platebni brane</param> /// <param name="targetGoId">identifikator prijemnce - GoId</param> /// <param name="secureKey">kryptovaci klic prideleny GoPay</param> /// /// <returns>paymentSessionId</returns> public static long PerformRecurrence( long parentPaymentSessionId, string recurrentPaymentOrderNumber, long recurrentPaymentTotalPriceInCents, string recurrentPaymentCurrency, string recurrentPaymentProductName, long targetGoId, string secureKey) { try { // Inicializace providera pro WS AxisEPaymentProviderV2Service provider = new AxisEPaymentProviderV2Service(GopayConfig.Ws); EPaymentStatus paymentStatus; string encryptedSignature = GopayHelper.Encrypt( GopayHelper.Hash( GopayHelper.ConcatRecurrenceRequest( parentPaymentSessionId, recurrentPaymentOrderNumber, recurrentPaymentTotalPriceInCents, targetGoId, secureKey) ), secureKey); ERecurrenceRequest recurrenceRequest = new ERecurrenceRequest(); recurrenceRequest.parentPaymentSessionId = parentPaymentSessionId; recurrenceRequest.orderNumber = recurrentPaymentOrderNumber; recurrenceRequest.totalPrice = recurrentPaymentTotalPriceInCents; recurrenceRequest.targetGoId = targetGoId; recurrenceRequest.encryptedSignature = encryptedSignature; paymentStatus = provider.createRecurrentPayment(recurrenceRequest); if (paymentStatus.result == GopayHelper.CALL_COMPLETED) { GopayHelper.CheckPaymentStatus( paymentStatus, GopayHelper.SessionState.CREATED.ToString(), targetGoId, recurrentPaymentOrderNumber, recurrentPaymentTotalPriceInCents, recurrentPaymentCurrency, recurrentPaymentProductName, secureKey); return((long)paymentStatus.paymentSessionId); } else { throw new GopayException("Bad payment status"); } } catch (Exception ex) { // // Chyba pri komunikaci s WS // throw new GopayException(ex.ToString()); } }