CubeCartForums.org for CubeCart third-party documentation, modifications, skins and services

Welcome Guest ( Log In | Register )

 Forum Rules New mod submissions
 
Reply to this topicStart new topic
> Payment Test Gateway
Goober Mods
post Jun 9 2011, 09:12 PM
Post #1


Regular Member
Group Icon

Group: Members +
Posts: 218
Joined: 13-March 07
From: Salisbury Mills, NY, USA
Member No.: 13




File Name: Payment Test Gateway
File Submitter: Goober Mods
File Submitted: 9 Jun 2011
File Category: Gateways
For CubeCart Version: CubeCart v5.0.0 RC1

An exercise in futility or a useful mod, you decide.

This a Payment Test Gateway. Use this mod to test how your v5 site behaves when payment gateway responds with successful, failed or pending order process.

Just upload and enable. Itís plug-and-play for CC V5.

Click here to download this file
Go to the top of the page
 
+Quote Post
Robsta
post Jun 10 2011, 07:19 AM
Post #2


Skin Developer
Group Icon

Group: Administrator
Posts: 8,235
Joined: 11-March 07
From: Exmouth, UK
Member No.: 2

Catalogue Listing
About Us
Store Review Here



Could you not update your other v5 submission? This is a duplicate submission.


--------------------
Integrated HELPDESK and RMA (Returns Management) - Integrated BLOG / NEWS - Better than using Wordpress!
Add a feature rich Blog/News System and Helpdesk/RMA system to your CubeCart v4 store. Contact us for a demo.
Follow us on Facebook! Get CubeCart!

Search Engine Sitemap Feeds - Merchant Center Product Feeds - Customer Follow-up Email Mod - Essential for every store!
Go to the top of the page
 
+Quote Post
Brian Smither
post Feb 17 2012, 12:10 AM
Post #3


CubeCart Jedi Knight
Group Icon

Group: Supporter
Posts: 2,429
Joined: 11-June 07
From: Rocky Mountains
Member No.: 568



The archive's folder structure is not correct.

What it is:
modules>gateway>contents

Should be:
modules>gateway>Payment_Test_Gateway>contents

Go to the top of the page
 
+Quote Post
Brian Smither
post Feb 18 2012, 12:27 AM
Post #4


CubeCart Jedi Knight
Group Icon

Group: Supporter
Posts: 2,429
Joined: 11-June 07
From: Rocky Mountains
Member No.: 568



And I can't get it to work.

PHP 5.3.5
Apache 2.2

The file gateway/gateway.php accepts four POST variables. Three are used and five added variables for a total of eight keys and their urlencode() values all strung together in the proper format.

Then cURL is initialized with the field string given to:
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);

But that's not the string arriving at cURL's target URL! What's arriving at the target is exactly the POST array that this script received in the first place.

Here's what I don't understand...
The cURL request is coming from CC5, but the target address is also CC5. Does everybody play nice in this situation?

Go to the top of the page
 
+Quote Post
Brian Smither
post Feb 21 2012, 03:16 AM
Post #5


CubeCart Jedi Knight
Group Icon

Group: Supporter
Posts: 2,429
Joined: 11-June 07
From: Rocky Mountains
Member No.: 568



Ok, I traced it all out and, well, it's interesting what you find when you do that (see several bug reports).

Anyway, the mod works as is but needs a few tweaks:

In /gateway/gateway.php, above the line that starts with: foreach($fields as $key=>$value)
Add:
CODE
$fields_string = '';

please change the line to this:
CODE
$fields_string = rtrim($fields_string,'&');

In gateway.class.php, please change the line to this:
CODE
httpredir(currentPage(array('_g', 'mod_type', 'cmd', 'module'), array('_a' => 'complete')));
Go to the top of the page
 
+Quote Post
tvance
post Dec 3 2012, 03:05 AM
Post #6


Member
Group Icon

Group: Members
Posts: 21
Joined: 9-August 10
From: Chehalis, WA
Member No.: 16,312



I would like this TEST modification for my V5.1.5 ...

I need it installed...
Can Goober Mods do this. I don't know how to upload a file to my CC5? Or point me to a tutorial... please!

Thanks



--------------------
Thanks,
Taylore Vance
PS: Energy Healing - Feel better happier with a better flow of higher energy!
Use natural alternative supplements to cleanse and supplement your body... Reiki Ranch Store (CC5.1.5)
Go to the top of the page
 
+Quote Post
Brian Smither
post Dec 3 2012, 04:35 AM
Post #7


CubeCart Jedi Knight
Group Icon

Group: Supporter
Posts: 2,429
Joined: 11-June 07
From: Rocky Mountains
Member No.: 568



Hello tvance,

I'll be happy to help you with this (no charge - I have to say that).

I'll send you a Personal Message tomorrow.

I have this mod in my CC514 code.
Go to the top of the page
 
+Quote Post
vorlockfoss
post Jan 2 2013, 03:22 AM
Post #8


Newbie
Group Icon

Group: Members
Posts: 4
Joined: 23-April 08
Member No.: 4,542



QUOTE (Brian Smither @ Dec 3 2012, 04:35 AM) *
Hello tvance,

I'll be happy to help you with this (no charge - I have to say that).

I'll send you a Personal Message tomorrow.

I have this mod in my CC514 code.


Hi Brian, how are you?

I would like this in my 515 store too, can you help me?

I should be able to install...

Thanks,

Paul.
Go to the top of the page
 
+Quote Post
Brian Smither
post Jan 2 2013, 06:20 AM
Post #9


CubeCart Jedi Knight
Group Icon

Group: Supporter
Posts: 2,429
Joined: 11-June 07
From: Rocky Mountains
Member No.: 568



There has been a code change from CC514 to CC515 in all gateway modules: a selector to choose if this payment gateway should appear in the Mobile skin, the Main skin, or Both.

It is up to you if you want to add this selector for what is, by definition, a testing module.

In the module's file: /Payment_Test_Gateway/skin/admin/index.tpl,

FIND:
CODE
            <fieldset><legend>{$LANG.module.config_settings}</legend>

ADD AFTER:
CODE
            <div><label for="scope">{$LANG.module.scope}</label><span>
                    <select name="module[scope]">
                        <option value="both" {$SELECT_scope_both}>{$LANG.module.both}</option>
                        <option value="main" {$SELECT_scope_main}>{$LANG.module.main}</option>
                        <option value="mobile" {$SELECT_scope_mobile}>{$LANG.module.mobile}</option>
                    </select></span>
            </div>

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th July 2014 - 08:00 PM
CubeCart Developers Network
Get CubeCart!
© 2007 - 2014  CubeCartForums.org in association with Inspired Solutions. Sponsored by Devellion