示例#1
0
        public PaymentMethodsBVG DiscoverPaymentMethodBVG()
        {
            string URL = endpoint + BVTP_PAYMENTMETHOD_DISCOVER;

            string result = ExecuteRequest(null, URL, METHOD_GET, false);

            return(OperationsParserBVG.ParseJsonToPaymentMethod(result));
        }
示例#2
0
        public TransactionBVG Transaction(TransactionBVG transaction)
        {
            string URL = endpoint + BVTP_TRANSACTION;

            string json = OperationsParserBVG.GenerateTransactionJson(transaction);

            string result = ExecuteRequest(json, URL, METHOD_POST, true);

            return(OperationsParserBVG.ParseJsonToTransaction(result));
        }
示例#3
0
        public NotificationPushBVG NotificationPush(NotificationPushBVG notificationPush)
        {
            string publicRequestKey = (string)(notificationPush.GetGeneralData()[ElementNames.BVG_PUBLIC_REQUEST_KEY]);
            string URL = endpoint + BVTP_NOTIFICATION_PUSH + "/" + publicRequestKey;

            string json = OperationsParserBVG.GenerateNotificationPushJson(notificationPush);

            string result = ExecuteRequest(json, URL, METHOD_PUT, true);

            return(OperationsParserBVG.ParseJsonToNotificationPushBVG(result));
        }
示例#4
0
        public User GetCredentials(User user)
        {
            string url = endpoint + CREDENTIALS;

            url = url.Replace("t/1.1/", "");
            User userResponse = new User();

            string json   = JsonConvert.SerializeObject(user.toDictionary(), Newtonsoft.Json.Formatting.Indented);
            string result = ExecuteRequest(json, url, METHOD_POST, false);

            userResponse = OperationsParserBVG.ParseJsonToUser(result);

            return(userResponse);
        }