Issue in redirecting back to our Site from sandbox test authorize net - authorize.net

After processing the payment, control is not directing back to our site(x_relay_url) from https://test.authorize.net/gateway/transact.dll.
The URL mentioned in the x_relay_url cannot be accessed directly it requires session id and other details to access it which was passed to Authorize net page using merchantDefinedData variables.
I checked the following article also but our URL seems to be fine and we checked our code there is nothing wrong in that.
I tried multiple URLs in "x_relay_url" but nothing seems to be working.
Any help is appreciated.
Error Message:
An error occurred while trying to report this transaction to the
merchant. An e-mail has been sent to the merchant informing them of
the error. The following is the result of the attempt to charge your
credit card.
This transaction has been approved.
It is advisable for you to contact the merchant to verify that you will receive the product or service.

Related

Flask + Stripe - how can I prevent people from accessing my successful checkout page without making a payment?

Basically I understand how to integrate Stripe payment into Flask, I'm using the official website (https://stripe.com/docs/payments/accept-a-payment?integration=elements) as a guide. In the guide the user is taken to a success page after the payment is successful. What I want to do upon a successful payment is collect the user's email, create a randomized password, and then email that password to the user. I've learned how to grab information from the session id using this page (https://stripe.com/docs/payments/checkout/custom-success-page). What I'm concerned about is that a user might go to the success page, get an account, and bypass the required payment.
My idea to solve that is to get the session info using this line:
session = stripe.checkout.Session.retrieve(request.args.get('session_id'))
and then before doing anything else check if it's none. If it's none, it will display an error page, if it is not none then it will create an account for the user. Would that work? Or would people just be able to change the session_id in the url until they find a number that is a valid session?
If that doesn't work, all I really want to do is upon successful payment create an account for the user using their email and a randomized password. How do I do that?
You're on the right track. Generally the flow is:
Customer is redirected to Checkout
Customer pays
Checkout redirects customer back to your success_url
You fetch the Checkout Session using the ID in the URL to confirm a valid payment
For #4 you can do various things to make sure people can't guess a Checkout Session ID (which would be unlikely due to their length and complexity). I suggest checking to see if the successful payment happened within a certain timeframe, like the past hour or past day, for example.

Authorize.Net hosted form: how to verify payment succeeded after redirect

I'm using the hosted payment form with getHostedPaymentPageRequest
After successful payment the browser opens by success url correctly.
However, i dont know how to verify that payment was actually completed. I have the token from getHostedPaymentPageRequest, but i cant find an API to call to get the result of that transaction.
I can see that when using an IFrame we can use the IFrameCommunicator, but we would prefer to not use that.
How can i verify the transaction succeeeded after redirect back from the hosted payment page?
If you don't use the iframe you won't get the results of the transaction in real time. Your best option then is to use a webhook to receive a notification of the successful payment. You can then get the transaction info using the transaction ID provided by the webhook. But that would mean the user won't know the status of their payment when they arrive back at your site. For that to happen you'd have to build a mechanism that does the above and have your receipt page poll your backend until it has the results of the transaction and then can display them to the user.

Transaction Failure in payment gateway Authorize.net

I have installed authorize.net sdk(PHP) and changed config file. I am running the sample app that comes along with the bundle.
When I proceed with the payment, the transaction fails and responses below error
"We're sorry, but we can't process your order at this time due to the following error:
The merchant login ID or password is invalid or the account is inactive.
response code 3
response reason code 13"
Naturally you need to verify your login credentials are correct. Also, make sure you are using the right server. You can use the production server or development server for testing. If you mix up your credentials that will cause this also.

django-allauth social network error

I am using django all-auth for authenticating users via social networks so, when I'm trying to login via facebook/google/twitter through url:
http://127.0.0.1:8000/accounts/socialnetwork/login
( here socialaccount is facebook/google/twitter), I'm able to login successfully and then getting redirected to:
http://127.0.0.1:8000/accounts/profile/
but when I'm going to url:
http://127.0.0.1:8000/accounts/socialnetwork/login/callback/
I'm getting this error "an error occured while logging via social network" but could see "signout" and "change email" options if I'm already logged in.
Also,when I'm going to
http://127.0.0.1:8000/accounts/social/connections/
sometimes I can see only google and twitter accounts, sometimes only facebook accounts but not both depending upon my site_id in settings.py.
Now I'm really confused whether this is an issue with my callback urls or my site domains or something else.
You mention that visitting http://127.0.0.1:8000/accounts/socialnetwork/login/ (where I assume socialnetwork is one of google/twitter/facebook) works fine. Congratulations! -- because these are the proper entry points for logging in with a third party provider.
You should not be visitting the callback url directly yourself. It is meant to be redirected to by the third party provider. In doing so, it passes along authentication related codes that can be used to login. If you visit the url directly these codes are not passed, hence, the system will complain with "an error has occurred"...
As for the issue with respect to the social connections url: what you see here is all third party accounts connected to the local user account. So, if it varies from time to time I can only assume you are logging in under different accounts - which implies different connected third party accounts.
There is a fair amount of confusion for me around what values go where, there is an APP_ID from Twitter that seems to be useless unless you are filing a support request but somehow from the docs I got the idea that that was the value I needed to put into the CLIENT_ID, but NO, you need to put in the API_KEY there.... The lack of good logging/display of the errors by the template (because of a malformed exception text) makes it hard to figure out what is going on. Luckily I set a breakpoint and found the real error, changed the values around and voila, it was working....
Not sure who is at fault here, allauth or twitter, but it would help if everyone could get on the same page when it comes to naming things.

Facebook SDK 3.1 - Error: HTTP status code: 400

I am getting the following error ("Error: HTTP status code: 400") now that I have updated to facebook SDK 3.1 as of yesterday, 10/9. But everything is completely functional as far as connecting with facebook, I just see this error message every time I start a facebook session on my app. I have seen a few people commenting on this, but I can't determine from them if this is going to be a real problem or not. Does anyone know definitively if this is going to cause a problem? And if so, how to fix it? Thanks!
The original issue was resolved by Facebook just after the 3.1 SDK was released.
But some are still having issues, if you have this issue you should check the login flow, and look at facebooks examples, after that if you are still having issues this could be a hint to a solution.
I got the 400 error when I do not have authorization to get to my information. The strange thing is that I get an accessToken and even a valid login (this is because I structured my code, with the help according to Scrumptious example and did a valid login when the Session state is open).
The FBSessionState is only opened for like a second and then it changes to closed with an 400 Error.
With iOS6 native login you get the permission alert when you ask for it, and then the phone remember that choice for 24 hours. But if the user logs in to the facebook home-page and then deletes permission for the application the phone will not recognize that the user has deleted the permissions for 24 hours, since it remembers the that the phone has already asked it and approved it (in the 24-hour window), regardless if you re-install the app or not.
I found this out after some hours of debugging, since I allowed the application from the Settings in iOS, but I could not post, and since I deleted the permission from the facebook privacy, and the alert would not show again there was nothing I could do but to manually give me permissions via a debug tool or wait 24 hours so I could accept the facebook-permission alert again.