Press "Enter" to skip to content

Category: Life: Work and Techy

Techy: Cross Browser Testing

For a while now, I’ve been a great fan of Browser Shots to test websites in Firefox, Internet Explorer, Safari and Opera without having to install all of those web browsers (and previous versions) on my machine. However, it does have a snag: you can only test “static pages”: you can’t interact with the page in anyway (so if you wanted to see if a drop down menu worked well in IE 5.5, you’re out of luck).

However Keyboardface has just blogged about a service I hadn’t heard of before called Cross Browser Testing.com which gives you practically a VNC/remote desktop/LogMeIn style connection to a remote computer (which seem to be Virtual Machine images) which has a selection of browsers installed for you to interactively test on. It’s pretty cheap: there’s a free option, $1 for 5 minutes option (with discounts) or a “pay per month” option. It’ll be worth considering when I’m needing to test the site I’m working on on multi-platform and multi-browser scenerios.

Techy: Test Credit and Debit Card Numbers

I’ve been working on an e-commerce system recently (as you may have been able to guess) and to test the credit card integration side of things, I needed some test credit card details of “valid looking” card numbers…

I eventually managed to gather 102 card numbers which passed validation: i.e. the Bank Identification Number [BIN] / Issuer Identification Number [IIN] numbers [the first 7 digits] matched up with the “alleged” card type and the whole card number passed the Luhn algorithm validation.

I must emphasis, before I get thousands of comments, these are TEST credit card numbers and are NOT VALID (I did not get as far as validating that they were theoretically assigned to a bank: just that they were theoretically assigned to a card issue): they are intended to test code in development to ensure that the code recognises the card type correctly and the Luhn algorithm is correct. You should, therefore, be able to use any expiry date or CCV/CSC you like for testing.

You can download these credit card numbers in a BSD released PHP file to make it easier to test with if you wish.

The developmental test card numbers are after the jump (along with details of the original sources):

Javascript: innerHTML, Select menu and Internet Explorer

I’ve just had cause to pull in the contents of a SELECT menu using Javascript to help build up a webpage on the fly using the DOM. I had to do it this was a there were potentially 4,000 items for a select html menu (and so the user had to narrow it down by pre-selecting another menu) and then pulling the list of items from the server. The were also some optgroups in there (making using JSON or XML that bit harder) and there could, potentially, be some formatting information. Oh – and there could be 1 or 100 of these menus on the webpage.

The way I initally worked it, and which worked in Firefox, was to use:
document.getElementById(‘menuname’).innerHTML=fetchedHTML;
(menuname being the id of the Domscripting gave me a clue and I eventually finished up with:
document.getElementById(‘menuname’).parentNode.innerHTML = ‘‘;
(i.e. recreating the entire select menu from scratch). It’s not nice, but it works!

Paypal Express Checkout and Recurring Payments

Are you, like me, using Paypal Express Checkout for integration into your shopping cart/ecommerce site?
Are you, like me, utilising the Paypal Subscriptions (Recurring Payments) options to set up future payments?
Are you, like me, getting a blank page when you are trying to setup a Recurring payment (maybe using the PHP NVP kit) after clicking “Agree and Pay” on the “Review your payment” page of the Paypal sandbox or live site)?

If so, the problem may be because you are sending an “AMT” (Amount) of 0 to Paypal: I did this because I didn’t want to actually take any money now…

It appears this is a long standing issue with the SetExpressCheckout section and RecurringPayments on Paypal and to avoid the blank white page, you’ll need to just send a nominal amount (such as 0.01) for Paypal to process “now”. However, Paypal does charge you a 20p transaction fee on the live system, so you may need to adjust your entire Paypal Express Checkout integration.

Internal Server – Firewall workaround needed

At work, we’re developing something on an internal server which is behind several firewalls and routers, but we need to allow a third party website (Paypal to be exact) to be able to connect to the web server.

It is nearly impossible for me to put this machine either on the public internet or make a hole in the firewall tables (basically, it’s behind our internal NAT providing router, which is then on a NATted firewalled building router, which is then on another NATted firewalled building providers router/VPN – and then the ISPs NATted firewalled router). As you can imagine, being behind 4 routers each with their own firewall configuration and us being unable to get the rules changes makes this a bit difficult.

However, along with the Linux based web server within our LAN, I do also have a remote Linux server with spare IPs. But how can I setup a connection so that the 3rd party can go to http://testdomain.myserver.example.com which then connects to my remote Linux server which then, somehow, connects to the LANed server.

We can make as many outbound connections on whichever ports we like from our LAN (so I can connect the LAN server to the remote server), but then how do I do the connection and how do I then forward the requests inbound?

Any ideas?