AngularJs:Respnd从第三方服务器的HTTP POST [英] AngularJs: Respnd to Http post from third part server

查看:186
本文介绍了AngularJs:Respnd从第三方服务器的HTTP POST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用AngularJS和一个的NodeJS应用。作为新的双方,我挣扎了一下。

I am developing an app using AngularJS and NodeJS. Being new to both I am struggling a bit.

我的应用与支付网关进行通信,以方便支付。流程是这样的MyApp - >支付网关 - > MyApp的。我能够将请求发送到支付网关。 问题是我无法弄清楚如何我会处理的响应是从支付网关的到来。支付网关在POST请求发送一些数据。我需要展示给用户事务的结果之前,处理这些数据。

My app is communicating with payment gateway to facilitate payments. Flow goes like MyApp-->Payment Gateway --> MyApp. I am able to send the request to payment gateway. Problem is I am not able to figure out how I will handle response that is coming from payment gateway. Payment Gateway is sending some data in the post request. I need to process this data before showing results of transaction to user.

从技术上讲,我知道需要做什么。就像给一个返回URL到支付网关步骤1)到发布采购信息将被发送。步骤2)这是我的应用程序将从支付网关接收到的数据发送到服务器端进行处理的HTML网址。步骤3)根据处理结果,我会展示交易结果的用户。

Technically speaking I know what needs to be done. Like Step 1) Giving a return URL to Payment Gateway to which Post request will be sent. Step2) This HTML URL of my application will send data received from payment gateway to server side for processing. Step3) Based on processed results I will show transaction result to user.

我在哪里挣扎是展示实现这一目标使用AngularJS和的NodeJS。请帮助

Where I am struggling is show to achieve this using AngularJS and Nodejs. Pls help

推荐答案

您可以使用角的的 $ HTTP 服务可以轻松地发送和从服务器获取数据。

You can use Angular's $http service to easily send and get data from server.

这篇关于AngularJs:Respnd从第三方服务器的HTTP POST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆