Why is Authorize.net throwing an error when my relay response URL points to a CodeIgniter controller and not otherwise? - codeigniter

I'm not typically a web developer, but I'm a decent enough coder that I felt comfortable accepting a proposal from a friend to develop his brother's small business website. I'm nearly finished and I've been using CodeIgniter, which has been a huge help and was easy to jump into.
They have a handful of products they'd like available for purchase via the site, their preference was Auth.net (which I have no previous experience with), and their host does not support SSL (nearlyfreespeech.net), so I decided that Auth.net's SIM was appropriate. If I test SIM outside of the CI application with a relay response page which simply spits out the available transaction details, everything goes as expected. If I try it with the relay response page set to a CI controller/method which simply echoes a string, Auth.net displays the following 'error':
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.
My initial thought was that perhaps the rewrite rule I set up to circumvent having to include the index.php front controller was the issue, so I tried including it in the relay response URL with no change. I should also note that the controller in question implements a _remap() method, but the relay response method shouldn't be affected by it as it doesn't match it's regex.
Any insight(s) would be greatly appreciated.

This error occurs when your script doesn't respond within a specified amount of time. It also is displayed if anything other then a 200 success message is returned. So basically there is an error in your relay response URL.
You need to test this first by pulling up the page directly to see if it works and returns the proper header response. Then you can test it by sending a simulated POST response to it and see if it also responds properly. If those work make sure the script isn't taking too long to respond. If it is there probably are ways to optimize the slow page to give the response in the appropriate amount.

Related

Clickatell - API access to billing log?

I need to be able to access a log of all SMS that were sent. Is there a way to do this via their HTTP API? I haven't had much luck finding anything that reference this in their docs.
There is a feature called 'callbacks' that can send an HTTP request to your server for every message you send. It will give you status updates about the message and the message charge. This allows you to build up whatever form of custom reporting that you may want.
https://www.clickatell.com/developers/api-docs/callback-(push-status-and-cost-notification)-advanced-message-send/
You send your message with the callback parameter... And you specify your URL to receive callbacks on your API connection on the website.
Unfortunately, you can't access reporting features like that via API. You need to log in to your central dashboard to get that information.
You can, however, query the message status if you have the message ID, but I don't think that's quite what you're looking for.
(Disclosure: I work for Clickatell)

AuthorizeNet Omnipay Error

I am using omnipay package for my payment method in authorized.
I have two site on the same server, one is a live site that runs ssl and one that is for testing purposes only and do not run ssl.
Now, i dont have problem on paying in our testing site which it runs within our expectation. But, it seems odd in our live site because after entering my billing information, it returns an error that says:
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.
Where do u think the problem lies? I really need help on this. Thanks!
This means the relay response URL used by your application is not returning a successful response to Authorize.Net in time (5 seconds). As a result Authorize.Net is assuming the page is not functioning and displaying that message.
You either need to verify the URL is correct, not error-ing out, and responding within a few seconds.

After a successful Magento payment via SagePay, the customer is redirected to the empty basket page. Why?

As a team we're currently investigating a strange occurrence. It doesn't seem to apply to all orders by any means, but it is affecting a large number of customers based on the logging we've added to the noItems.phtml page.
Please note: I'm not really expecting an answer as I assume this is a problem we have to solve ourselves based on addons, and our server configuration (three servers for loading balancing). However, I am looking for possible ideas and/or whether this is something somebody has come across previously.
What we've done so far, and what we know:
User enters their card details in the SagePay iFrame;
User purchases an item via SagePay -- order is successful;
Some users are sent back to the success page;
Some users don't see the success page (phoned to confirm a handful) but instead return back to the empty basket;
We're still investigating, but we find it ever so strange how a user would return to the empty basket page. We've added logging to the noItems.phtml and we can see that some users are getting assigned another session ID after a successful transaction. This seems to be the problem, but why the user is being assigned another session ID after a SagePay payment isn't easy to comprehend.
Has anybody else experienced a similar issue with SagePay/Magento? And if so, what steps did you take to solve?
Our Sage Pay Support team would be happy to look at the transaction logs (within 72 hours of the transation being submitted) and help you determine the reason for the failed transactions on 0845 111 4455 24/7.
You reply to the Notification URL when you acknowledge receipt of our response. You have 20 seconds to response. You need to send the Status (OK, Error or Invalid), Status Detail and Redirect URL. We then send the shopper back to your Redirect URL.
A few suggestions would be:
If we can't reach your Notification URL, check you have ports 443 and 80 open. Check you don't have a DNS issue.
If you are receiving the notification from Sage Pay to confirm the status of the transaction via the Notification URL. Check the information you are sending is in the correct casing, that it is not empty data and that your website is not spooling and check whether the success/failure URL is a valid landing page.
All our system needs is the Status Deatil, 'Status = ' and 'RedirectURL =' fields with the appropriate values assigned, separated with Carriage-Return and Line-Feeds (as specified in the protocol) . Nothing else is required. The response you send should also be text/plain message, not text/html or any other MIME type.
If the customer is being sent back to an empty basket, check whether your website is doing a job in the background such as writing to a databse, preparing confirmation emails to the back office before sending the customer to the payment page. Test whether your server can handle the amount of transactions coming through from Sage Pay. Or are you truncating the NEXT URL?
Regarding a session ID, each transaction is assigned a unique Sage Pay ID called a VPSTxID which is used to identify the transaction. We can take a look at the transactions you are referring to if you are getting several session IDs to discuss further if you would like.
Sage Pay Support.
Check the action that pushes the user to the success page on successful purchase. Maybe its something like target _parent. Maybe its something where its trying to load the success page in the iframe. Or maybe its timing out on sagepay when trying to redirect.

Ajax & ASP Classic Notification Display

I'm doing some updates for an intranet i created few years ago using ASP Classic. What i've been ask to do is to ALERT all users when news on intranet is added. Basically i need to check on database when news is added and than trigger an action to all intranet users saying you have New Message
I'have done a lot of research on this and i could't really find a good example for it.
Your help will be much appreciated.
Cheers
Vullnet
Basically to need to poll the server using AJAX and check for new messages.
I suppose you have a messages table with and ID that counts up. You need to track each user's last message pointer, and send this as part of your AJAX request ad a parameter. If the server's ID is higher thsn the user's then they have a new message.
Based on the AJAX response you then alert the user.
You need to make an ASP that responds to your AJAX call, Pass it a number and it responds with "OK" (not new) or "NEW".
IT works the same way, regardless of the server-side language. Use jQuery to perform your AJAX calls.

Sagepay API - Simulate rejected payments?

I'm testing an app which accepts payments through Sagepay.
It all seems to be working OK but I would like to test various types of non-successful responses in the Sagepay sandbox.
For example, each test I have done so far has returned a status of OK. It is also possible to receive statuses like REJECTED, NOTAUTHED, INVALID etc
Is it possible to simulate these responses in some way?
Entering incorrect details repeatedly just returns me to the failure URL I specify in the API settings.
If you login to your simulator account on Sagepay via https://test.sagepay.com/simulator/ you can tell it which responses to return. You can instruct it to return random responses, or MALFORMED, INVALID, ERROR, NOTAUTHED, REJECTED, 3DAUTH.
Unfortunately you have to change these through the admin panel and then they apply for each transaction rather than using different details to trigger different responses.
In addition to Steve's answer, if you use the SERVER integration you can click different buttons to SIMUALATE (on the SIMULATOR server) a reply from SagePay gateway.

Resources