Jump to content

[Resolved with NEW VERSION] SecPay Gateway Issues


keat

Recommended Posts

Since going live on Saturday with V6, i'm being told that SecPay(PayPoint) notifacations are missing information in the emails we recieve.

Namely the customers billing and shipping detials along with the cart_order_id

 

 

Link to comment
Share on other sites

I've just got off the phone to Paypoint, who have suggested that the cart is not sending this info, so I'm stuck.

I've reset the cache, and see what happens with the next PayPoint payment.

It appears to be missing the customers shipping and billing details, along with the cart_order_id.

I've looked on the PayPoint login page, and all orders paid via PayPoint seem to be missing this info.

Link to comment
Share on other sites

Looking at the PayPoint gateway code, no, this gateway does not send any info regarding the customer.

If PayPoint's API is written to accept such info, we would need to examine the API documentation to learn what format that data should be sent.

Link to comment
Share on other sites

The chap at PayPoint referred me to thism document, and said section 8 on page 14 ??

 

https://www.paypoint.net/assets/guides/Gateway_hosted_integration_v2.0.pdf

 

What I'm confused with is it worked on V3 but doesn't on V6.

If you look at the attached image, you'll see the last order on Friday evening, and the first one today (after I'd set it up).

Note how the cart ID is some random hex

secpay.jpg

Who wrote the PayPoint plugin.

Was this Paypoint themselves or done by Al and the team ?

Link to comment
Share on other sites

Comparing CC3's SecPay module with CC6's PayPoint module, I see where CC3 can send all manner of data and a proper cart order number, and CC6 sends the code "CC5" with a hash of the time and the product of two random numbers appended.

It doesn't matter who wrote the module. It matters who will enhance it and when.

We can certainly start work on getting CC6's module to send more data.

Link to comment
Share on other sites

I would be surprised if they had.

Of the dozens of eCommerce solutions available, each having their own methodology of hooking into the overall structure in order to provide a means to pay for an order, would mean considerable effort to understand how to code a module for each of those solutions.

I have seen available modules listed at payment provider sites, but I would have to suppose they are posted there as a convenience for the eCommerce solution provider who actually wrote the module - and not that the provider wrote those modules.

Link to comment
Share on other sites

Without it, I can't use it.

The office staff rely heavily on on the information being accurate.

I'm extremely surprised that the dozen or so payments that went through, actually did so.

Link to comment
Share on other sites

Please try this. In the file /modules/gateway/PayPoint/gateway.class.php:

Find:

$hidden	= array(
	'trans_id' 		=> 'CC5'.md5(time().(rand(0,32000)*rand(0,32000))),
	'merchant' 		=> $this->_module['merchant'],
	'amount' 		=> $this->_basket['total'],
	'callback' 		=> $GLOBALS['storeURL'].'/index.php?_g=rm&type=gateway&cmd=process&module=PayPoint&cart_order_id='.$this->_basket['cart_order_id'],
	'options' 		=> $test_mode.'currency='.$GLOBALS['config']->get('config', 'default_currency').',cart=cubecart',

Add after that:

	'bill_name' => $this->_basket['billing_address']['first_name']." ".$this->_basket['billing_address']['last_name'],
	'bill_addr_1' => $this->_basket['billing_address']['line1'],
	'bill_addr_2' => $this->_basket['billing_address']['line2'],
	'bill_city' => $this->_basket['billing_address']['town'],
	'bill_state' => $this->_basket['billing_address']['county'],
	'bill_country' => $this->_basket['billing_address']['country_iso'],
	'bill_post_code' => $this->_basket['billing_address']['postcode'],
	'bill_email' => $this->_basket['billing_address']['email'],
	'bill_tel' => $this->_basket['billing_address']['phone'],
	'bill_url' => $GLOBALS['storeURL'],

	'ship_addr_1' => $this->_basket['delivery_address']['line1'],
	'ship_addr_2' => $this->_basket['delivery_address']['line2'],
	'ship_city' => $this->_basket['delivery_address']['town'],
	'ship_state' => $this->_basket['delivery_address']['county'],
	'ship_country' => $this->_basket['delivery_address']['country_iso'],
	'ship_post_code' => $this->_basket['delivery_address']['postcode'],

Save.

These additional bits of info is taken from CC3's module, so I have to assume the names of the info (bill_name, ship_post_code, etc) are still correct. I did not confirm with the API document.

Link to comment
Share on other sites

Ok, the delivery address First and Last name is still needed, and the actual cart order id:

Find this:

'trans_id' 		=> 'CC5'.md5(time().(rand(0,32000)*rand(0,32000))),

Change to:

'trans_id' 		=> $this->_basket['cart_order_id'],


Find the line that starts with:

'ship_addr_1'

Add before that:

	'ship_name' => $this->_basket['delivery_address']['first_name']." ".$this->_basket['delivery_address']['last_name'],

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...