Topic: Credit card processing in the UK

I'm looking to develop an online store built in Rails and based in the UK.

Can anyone recommend somewhere that processes online transactions or any tutorials on the subject?

Re: Credit card processing in the UK

Worldpay is quite good, but with relatively high setup/subscription costs (at least compared to the 'free' of less customisable solutions like PayPal).

Can't think of any other UK-specific ones off the top of my head.

Re: Credit card processing in the UK

Protx (www.protx.com) are very good, with a simple system and great rates - I use them with clients presently and things are good.

Re: Credit card processing in the UK

Ah yes, forgot them. They do require you to have your own Internet Merchant Account though, while Worldpay will sort it for you.

Re: Credit card processing in the UK

Hi Baltar,
Did you find it easy to integrate the protx gateway into a rails app?
And did you use the form or server product.
I am about to do the same and would be grateful for any advice on any potential gotcha's

Re: Credit card processing in the UK

vrnatio wrote:

Hi Baltar,
Did you find it easy to integrate the protx gateway into a rails app?
And did you use the form or server product.
I am about to do the same and would be grateful for any advice on any potential gotcha's

Hiya, sorry missed your post, didn't subscribe to the thread... I haven't actually needed a payment processor for any of my rails apps as of yet but it certainly shouldn't be too hard to get it to work, (I'm talking of the form product - that's the only one clients have needed) - at the end of the day it just outputs html form tags and receives a confirmation back from Protx so if I could implement it in php I don't see it being a problem in our beloved ruby big_smile  that having been said, if I do get called upon to use payments in a rails app I would probably just release the code out under MIT license, libraries for stuff like payment processing are the ideal open source code since money is involved and you want as many eyes on the code as possible looking for errors - someone might have already written one for all I know, haven't searched to be honest!

I think it's better to choose a payment gateway based upon client (or you own) needs and the services they offer rather than a particular ease of implementation (not suggesting that protx is hard to implement but you get my drift)

I'll shut up now because I'm starting to ramble.... big_smile

Re: Credit card processing in the UK

Does anyone have the simpleXOR function converted for use in ruby?

I am currently implementing the ProtX Form VSP on an e-commerce site and having trouble getting the XOR to work correctly

I have the output of the PHP function and my ruby function and they differ slightly

PHP:

function simpleXor($InString, $Key) {
  // Initialise key array
  $KeyList = array();
  // Initialise out variable
  $output = "";
 
  // Convert $Key into array of ASCII values
  for($i = 0; $i < strlen($Key); $i++){
    $KeyList[$i] = ord(substr($Key, $i, 1));
  }

  // Step through string a character at a time
  for($i = 0; $i < strlen($InString); $i++) {
    // Get ASCII code from string, get ASCII code from key (loop through with MOD), XOR the two, get the character from the result
    // % is MOD (modulus), ^ is XOR
    $output.= chr(ord(substr($InString, $i, 1)) ^ ($KeyList[$i % strlen($Key)]));
  }

  // Return the result
  return $output;
}


My Ruby:
def simple_xor(to_encode, password)
    keylist = Array.new
    output = ""

    #convert password into arrray of ascii values
    password.each_byte {|b| keylist << b}
    len = to_encode.length - 1
    (0..len).each do |i|
      temp = to_encode[i] ^ keylist[i.modulo(password.length)]
      output = output + temp.chr
    end
    output
  end


If anyone can see why my ruby isn't working the same as the PHP please let me know as this project needs finishing smile This problem is driving me bonkers at the moment tongue

thanks in advance for any help

Joe