Ejemplo n.º 1
0
        public ActionResult ShowMasterpass()
        {
            //  Logger.LogInformation("Payment controller ShowMasterpass action");

            ViewBag.JavascriptSessionUrl = getSessionJsUrl(GatewayApiConfig);


            //documentation links
            ViewBag.MasterpassCreateSession           = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Session%3a%20Create%20Session.html";
            ViewBag.MasterpassUpdateSession           = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Session%3a%20Update%20Session.html";
            ViewBag.MasterpassOpenWallet              = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Wallet%3a%20Open%20Wallet.html";
            ViewBag.MasterpassJSLibrary               = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/integrationGuidelines/supportedFeatures/pickPaymentMethod/masterPassOnline.html";
            ViewBag.MasterpassUpdateSessionFromWallet = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Wallet%3a%20Update%20Session%20From%20Wallet.html";
            ViewBag.MasterpassPay               = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Transaction%3a%20%20Pay.html";
            ViewBag.MasterpassAuthorize         = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Transaction%3a%20%20Authorize.html";
            ViewBag.MasterpassFullDocumentation = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/integrationGuidelines/supportedFeatures/pickPaymentMethod/masterPassOnline.html";


            string ORIGIN_RETURN_PAGE = "/masterpassResponse";
            string MASTERPASS_ONLINE  = "MASTERPASS_ONLINE";

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig);

            //build return URL
            //  string returnURL = Microsoft.AspNetCore.Http.Extensions.UriHelper.BuildAbsolute(Request.Scheme, Request.Host, Request.PathBase, ORIGIN_RETURN_PAGE);

            // gatewayApiRequest.MasterpassOriginUrl = returnURL;
            gatewayApiRequest.MasterpassOnline = MASTERPASS_ONLINE;


            return(View("PayWithMasterpass", gatewayApiRequest));
        }
Ejemplo n.º 2
0
        public ActionResult ShowRetrieveOrder()
        {
            //  Logger.LogInformation("Payment controller ShowRetrieveTransaction action");

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig, "RETRIEVE_ORDER");

            return(View("RetrieveOrder", gatewayApiRequest));
        }
Ejemplo n.º 3
0
        public ActionResult ShowVoid()
        {
            //  Logger.LogInformation("Payment controller ShowVoid action");

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig, "VOID");

            return(View("Void", gatewayApiRequest));
        }
Ejemplo n.º 4
0
        public ActionResult ShowCapture()
        {
            //  Logger.LogInformation("Payment controller ShowCapture action");

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig, "CAPTURE");

            return(View("Capture", gatewayApiRequest));
        }
Ejemplo n.º 5
0
        public ActionResult ShowPayThroughNVP()
        {
            // Logger.LogInformation("Payment controller ShowPayThroughNVP action");

            ViewBag.JavascriptSessionUrl = getSessionJsUrl(GatewayApiConfig);
            ViewBag.TestAndGoLiveUrl     = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/integrationGuidelines/supportedFeatures/testAndGoLive.html";

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig);

            return(View("PayThroughNVP", gatewayApiRequest));
        }
Ejemplo n.º 6
0
        public ActionResult ShowPayWithUnionPaySecurePay()
        {
            //  Logger.LogInformation("Payment controller ShowPayWithUnionPal action");

            ViewBag.JavascriptSessionUrl  = getSessionJsUrl(GatewayApiConfig);
            ViewBag.DocumentationUnionPay = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/integrationGuidelines/supportedFeatures/pickPaymentMethod/browserPayments/testDetails.html#x_SecurePayTest";

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig);

            return(View("PayWithUnionPay", gatewayApiRequest));
        }
Ejemplo n.º 7
0
        public ActionResult ShowAuthorize()
        {
            // Logger.LogInformation("Payment controller ShowAuthorize action");

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig);

            ViewBag.JavascriptSessionUrl = getSessionJsUrl(GatewayApiConfig);
            ViewBag.TestAndGoLiveUrl     = getTestAndGoLiveDocumentationURL();

            return(View("Authorize", gatewayApiRequest));
        }
Ejemplo n.º 8
0
        public ActionResult ShowPayWithToken()
        {
            //  Logger.LogInformation("Payment controller ShowPayWithToken action");

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig);

            ViewBag.JavascriptSessionUrl = getSessionJsUrl(GatewayApiConfig);
            ViewBag.TestAndGoLiveUrl     = getTestAndGoLiveDocumentationURL();
            ViewBag.ApiDocumentation     = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/integrationGuidelines/supportedFeatures/pickAdditionalFunctionality/tokenization/tokenization.html";

            return(View("PayWithToken", gatewayApiRequest));
        }
Ejemplo n.º 9
0
        public ActionResult Pay(int id)
        {
            //  Logger.LogInformation("Payment controller ShowPay action");
            var reservation = unitOfWork.ReservationRepository.GetByID(id);

            if (reservation == null)
            {
                return(HttpNotFound());
            }
            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig);

            ViewBag.JavascriptSessionUrl = getSessionJsUrl(GatewayApiConfig);
            ViewBag.TestAndGoLiveUrl     = getTestAndGoLiveDocumentationURL();
            ViewBag.Reservation          = reservation;
            ViewBag.Currency             = systemHelper.Currency;
            return(View("Payment", gatewayApiRequest));
        }
Ejemplo n.º 10
0
        public ActionResult ShowPayWith3ds()
        {
            //  Logger.LogInformation("Payment controller ShowPayWith3ds action");

            ViewBag.JavascriptSessionUrl = getSessionJsUrl(GatewayApiConfig);

            //documentation links
            ViewBag.DocumentationCreateSessionUrl        = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Session%3a%20Create%20Checkout%20Session.html";
            ViewBag.Documentation3dsEnrollmentUrl        = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/3DS%3a%20%20Check%203DS%20Enrollment.html";
            ViewBag.Documentation3dsProcessResultUrl     = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/3DS%3a%20Process%20ACS%20Result.html";
            ViewBag.DocumentationTransactionPayUrl       = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Transaction%3a%20%20Pay.html";
            ViewBag.DocumentationTransactionAuthorizeUrl = $@"{GatewayApiConfig.GatewayUrl}/api/documentation/apiDocumentation/rest-json/version/latest/operation/Transaction%3a%20%20Authorize.html";

            GatewayApiRequest gatewayApiRequest = GatewayApiRequest.createSampleApiRequest(GatewayApiConfig);

            return(View("PayWith3ds", gatewayApiRequest));
        }