public static API.Banktransfer.Add.Response Add(int amount, string bankAccountHolder, string bankAccountNumber, string bankAccountBic) { Client c = new Client("", ""); var request = new API.Banktransfer.Add.Request(amount, bankAccountHolder, bankAccountNumber, bankAccountBic); c.PerformRequest(request); return request.Response; }
/// <summary> /// Get details for all payment profiles /// </summary> /// <returns>List of payment profile info</returns> public static PAYNLSDK.API.PaymentProfile.GetAll.Response GetAll() { PaymentProfileGetAll request = new PaymentProfileGetAll(); Client c = new Client("", ""); c.PerformRequest(request); return request.Response; }
/// <summary> /// Get details for a specific payment profile /// </summary> /// <param name="paymentProfileId">Payment profile ID</param> /// <returns>Payment profile response</returns> public static PAYNLSDK.API.PaymentProfile.Get.Response Get(int paymentProfileId) { PaymentProfileGet request = new PaymentProfileGet(); request.PaymentProfileId = paymentProfileId; Client c = new Client("", ""); c.PerformRequest(request); return request.Response; }
/// <summary> /// Get Service Categories for a given payment option ID /// </summary> /// <param name="paymentOptionId">Payment Option ID</param> /// <returns>Response object containing service categories</returns> public static PAYNLSDK.API.Service.GetCategories.Response GetCategories(int? paymentOptionId) { ServiceGetCategories request = new ServiceGetCategories(); request.PaymentOptionId = paymentOptionId; Client c = new Client("", ""); c.PerformRequest(request); return request.Response; }
/// <summary> /// Get payment profile information for all your available profiles for the specified service category /// </summary> /// <param name="categoryId">The ID of the category of the service the payment options are used for</param> /// <param name="programId">ID of the program for which the payment options are used. (Only available if the program option is enabled!)</param> /// <param name="paymentMethodId">Payment Method ID</param> /// <param name="showNotAllowedOnRegistration">Indicator wether to show profiles that are initially not allowed on registration. </param> /// <returns>Response containing the list of payment profile information</returns> public static PAYNLSDK.API.PaymentProfile.GetAvailable.Response GetAvailable(int categoryId, int? programId, int? paymentMethodId, bool? showNotAllowedOnRegistration) { PaymentProfileGetAvailable request = new PaymentProfileGetAvailable(); request.CategoryId = categoryId; request.ProgramId = programId; request.PaymentMethodId = paymentMethodId; request.ShowNotAllowedOnRegistration = showNotAllowedOnRegistration; Client c = new Client("", ""); c.PerformRequest(request); return request.Response; }
public static API.Banktransfer.Add.Response Add(PAYNLSDK.API.Banktransfer.Add.Request request) { Client c = new Client("", ""); c.PerformRequest(request); return request.Response; }
/// <summary> /// Return service information. /// This API returns merchant info and all the available payment options per country for a given service. /// This is an important API if you want to build your own payment screens. /// </summary> /// <param name="paymentMethodId">Paymentmethod ID</param> /// <returns>FUll response with all service information</returns> public static PAYNLSDK.API.Transaction.GetService.Response GetService(PaymentMethodId? paymentMethodId) { TransactionGetService request = new TransactionGetService(); request.PaymentMethodId = paymentMethodId; Client c = new Client(); c.PerformRequest(request); return request.Response; }
/// <summary> /// Performs a request to start a transaction. /// </summary> /// <returns>Full response object including Transaction ID</returns> public static PAYNLSDK.API.Transaction.Start.Response Start(PAYNLSDK.API.Transaction.Start.Request request) { Client c = new Client(); c.PerformRequest(request); return request.Response; }
/// <summary> /// Performs a (partial) refund call on an existing transaction /// </summary> /// <param name="transactionId">Transaction ID</param> /// <param name="description">Reason for the refund. May be null.</param> /// <param name="amount">Amount of the refund. If null is given, it will be the full amount of the transaction.</param> /// <param name="processDate">Date to process the refund. May be null.</param> /// <returns>Full response including the Refund ID</returns> public static PAYNLSDK.API.Transaction.Refund.Response Refund(string transactionId, string description, int? amount, DateTime? processDate) { TransactionRefund request = new TransactionRefund(); request.TransactionId = transactionId; request.Description = description; request.Amount = amount; request.ProcessDate = processDate; Client c = new Client(); c.PerformRequest(request); return request.Response; }
/// <summary> /// Checks whether a transaction has a status of VERIFY /// </summary> /// <param name="transactionId">Transaction Id</param> /// <returns>True if VERIFY, false otherwise</returns> public static bool IsVerify(string transactionId) { try { TransactionInfo request = new TransactionInfo(); request.TransactionId = transactionId; Client c = new Client(); c.PerformRequest(request); return ((request.Response.PaymentDetails.State == Enums.PaymentStatus.VERIFY) || (request.Response.PaymentDetails.StateName == "VERIFY")); } catch (ErrorException e) { return false; } }
/// <summary> /// Checks whether a transaction has a status of PAID /// </summary> /// <param name="transactionId">Transaction Id</param> /// <returns>True if PAID, false otherwise</returns> public static bool IsPaid(string transactionId) { try { TransactionInfo request = new TransactionInfo(); request.TransactionId = transactionId; Client c = new Client(); c.PerformRequest(request); return (request.Response.PaymentDetails.State == Enums.PaymentStatus.PAID); } catch (ErrorException e) { return false; } }
/// <summary> /// Query the service for all (current status) information on a transaction /// </summary> /// <param name="transactionId">Transaction ID</param> /// <returns>Full response object with all information available</returns> public static PAYNLSDK.API.Transaction.Info.Response Info(string transactionId) { TransactionInfo request = new TransactionInfo(); request.TransactionId = transactionId; Client c = new Client(); c.PerformRequest(request); return request.Response; }