将支付网关与angularjs应用程序集成到spring后端

Integration of Payment Gateway with angularjs application with spring backend

本文关键字:集成 spring 后端 应用程序 angularjs 网关      更新时间:2023-09-26

谁能告诉我支付网关在Angularjs应用程序中的集成流程,后端是spring ?

最好的方法是什么?

我的困境是,从后端我们只获取JSON格式的数据,对视图/重定向的控制很少。由于显而易见的原因,我不想从javascript中调用payment gateway。

在这种情况下流是什么。任何提示都是感激的。

我使用JPOS(ISO8583消息路由器),Spring JPA(数据库管理),SparkJava(REST JSON数据API) angularjs(前端应用程序)和Apache qupid的组合构建了整个支付网关+ EFT交换机。

在你的例子中,你可以动态地创建一个iframe在你的angularjs部分页面/视图中加载外部支付网关。

var payload = 'https://yourexternatpaymentgateway.com?reference='+$scope.payment.reference+     '&name='+encodeURIComponent($scope.payment.name)+'&custid='+$scope.payment.phone+'&amount='+$scope.payment.amount+'&source_page=http://yourfeedbackpage'+
'&description='+encodeURIComponent($scope.payment.description);
jQuery('#console').html('<iframe width="100%" height="550px" src="'+payload+'" frameborder="0"></iframe></div>');