Click here to Skip to main content
15,919,879 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi all,

We are developing a website in AngularJs and Web API. In that I have to implement Payment Gateway. for that we have contacted PayUmoney. But unfortunately they dont have sample code for Angular or Web API.

Our registered URL is www.XXXX.in(done in angularjs)
Our service URL is dev.XXXX.in(done in Web API). we have implement the PG code in WebApi.

But payumoney accepts the request only coming from www.XXXX.in. So whenever we sends request to PayUmoney it says CORS issue{
Quote:
Response to preflight request doesn't pass access control check
}

What I have tried:

we cannot implement in angularJs since it is client side script.

Can anyone help me to Implement PG in web API?
Posted
Updated 28-Aug-16 4:37am
Comments
Richard Deeming 23-Aug-16 9:35am    
Contact the provider's support team. They should be able to help you correct your settings to get you working.

If they can't, or won't, then take your business to another provider.

Richard Deeming is absolutely right: Never, ever, accept code from a insecure website to handle anything to do with real money.
You do not know who is giving you the code, you do not know what it does, you do not know that it places the monies correctly into the appropriate account, without passing the details to any third parties.

Only get such code from PayUmoney themselves - the scope for fraud otherwise is far too large. And remember, you personally could be liable for any monies lost if your action is seen to be negligent - which getting your code from a public forum would most certainly be!

If they can't - or won't - then do you really want to trust them with the keys to your corporate bank account?
 
Share this answer
 
The issue is simply that the url you are actively using is different from the url you tell them the site uses. This is nothing to do with webapi or angular. Check if they allow a different url for your test site (most payment providers have a test system), failing that change the url to your dev url until you're ready to go live, however if they don't allow you to use test settings and a test environment then they're not a very good payment gateway.
 
Share this answer
 
v2
someone help me too... I too have the same issue ... can u do only the PG part in MVC and rest in webAPI
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900