CubeCart Bot Posted March 27, 2018 Share Posted March 27, 2018 Name: Test Payment Gateway Price: Free Category: Payment Gateways Homepage: https://www.cubecart.com/extensions/payment-gateways/test-payment-gateway Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 27, 2018 Share Posted March 27, 2018 This looks so much like Goober's plugin (Alex Goldberg, GWorks, ccmodder.com), albeit with a bit of enhancement. Just sayin' to know what appears to be the plugin's provenance. I have been using this plugin since 2011 for CC5. As such, there are two things that you need to be aware of: First, in gateway.transfer.php: Near line 19: foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string,'&'); Change to: $fields_string = ''; foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } $fields_string = rtrim($fields_string,'&'); Initializing $fields_string to an empty string satisfies very strict programming protocols - but is not essential to PHP. The rtrim() returns a value - and does not change the value by reference. Second, I have tried many times in many ways, but I have never managed to get the CURL transfer to happen on a localhost development machine. However, the problem may be caused by using a web server that is not Apache, or a version of PHP where CURL doesn't work on localhost (127.0.0.1). But, on a computer that responds to a FQDN, I have good results. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.