Some days ago I make a eCommerce website use WordPress & Templatic eShop Themes for my Clients. My clients use this for many of features. But only 7 Payment getaway without Alertpay & Moneybookers/Skrill. But my clients only use Paypal. But After some days later my client tell me to added Alertpay & Moneybookers/Skrill payment getaway for shop. Then I search Templatic forum or blog.. but there in no modules or plugin for this. After that I made this to modules for eShop themes.
Features:
1) No need Skrill/Moneybookers merchant account…
2) No need API/IPN Integration.
3) Credit/Debit or Bank Payment Support via Skrill
4) Just need to put account email
How to use?
First download this modules from here: [download id=”1775″]
Now go to your wordpress eShop themes payment modules directory & upload alertpay & moneybookers modules.
Directory location may here:
1 |
/public_html/wordpress/wp-content/themes/eShop/library/payment |
Now upload here alertpay & moneybookers modules.
Then go to:
1 |
/public_html/wordpress/wp-content/themes/eShop/library/includes |
and open “admin_paymethods.php” file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
<?php global $wpdb; if($_GET['status']!='' && $_GET['id']!='') { $paymentupdsql = "select option_value from $wpdb->options where option_id='".$_GET['id']."'"; $paymentupdinfo = $wpdb->get_results($paymentupdsql); if($paymentupdinfo) { foreach($paymentupdinfo as $paymentupdinfoObj) { $option_value = unserialize($paymentupdinfoObj->option_value); $option_value['isactive'] = $_GET['status']; $option_value_str = serialize($option_value); $message = "Status Updated Successfully."; } } $updatestatus = "update $wpdb->options set option_value= '$option_value_str' where option_id='".$_GET['id']."'"; $wpdb->query($updatestatus); } ///////////update options start////// if($_GET['payact']=='setting' && $_GET['id']!='') { include_once(TEMPLATEPATH . '/library/includes/admin_paymet_settings.php'); exit; } //////////update options end//////// /*$paymentsql = "select * from $wpdb->options where option_name like 'payment_method_%' order by option_id asc"; $paymentinfo = $wpdb->get_results($paymentsql); if(count($paymentinfo)==0) {*/ //////////Payment settings start//////// //////////Paypal settings start//////// $payOpts = array(); $payOpts[] = array( "title" => "Merchant Id", "fieldname" => "merchantid", "value" => "myaccount@paypal.com", "description" => "Example : myaccount@paypal.com", ); $payOpts[] = array( "title" => "Cancel Url", "fieldname" => "cancel_return", "value" => get_option('siteurl')."/?page=cancel_return&pmethod=paypal", "description" => "Example : http://mydomain.com/cancel_return.php", ); $payOpts[] = array( "title" => "Return Url", "fieldname" => "returnUrl", "value" => get_option('siteurl')."/?page=return&pmethod=paypal", "description" => "Example : http://mydomain.com/return.php", ); $payOpts[] = array( "title" => "Notify Url", "fieldname" => "notify_url", "value" => get_option('siteurl')."/?page=notifyurl&pmethod=paypal", "description" => "Example : http://mydomain.com/notifyurl.php", ); $paymethodinfo[] = array( "name" => 'Paypal', "key" => 'paypal', "isactive" => '1', // 1->display,0->hide "display_order"=>'1', "payOpts" => $payOpts, ); //////////paypay settings end//////// //////////Alertpay settings start//////// $payOpts = array(); $payOpts[] = array( "title" => "Merchant Id", "fieldname" => "merchantid", "value" => "myaccount@alertpay.com", "description" => "Example : myaccount@alertpay.com", ); $payOpts[] = array( "title" => "Cancel Url", "fieldname" => "cancel_return", "value" => get_option('siteurl')."/?page=cancel_return&pmethod=alertpay", "description" => "Example : http://mydomain.com/cancel_return.php", ); $payOpts[] = array( "title" => "Return Url", "fieldname" => "returnUrl", "value" => get_option('siteurl')."/?page=return&pmethod=alertpay", "description" => "Example : http://mydomain.com/return.php", ); $payOpts[] = array( "title" => "Notify Url", "fieldname" => "notify_url", "value" => get_option('siteurl')."/?page=notifyurl&pmethod=alertpay", "description" => "Example : http://mydomain.com/notifyurl.php", ); $paymethodinfo[] = array( "name" => 'Alertpay or Payza', "key" => 'alertpay', "isactive" => '1', // 1->display,0->hide "display_order"=>'2', "payOpts" => $payOpts, ); //////////Alertpay settings end//////// //////////Moneybookers settings start//////// $payOpts = array(); $payOpts[] = array( "title" => "Merchant Id", "fieldname" => "merchantid", "value" => "myaccount@moneybookers.com", "description" => "Example : myaccount@moneybookers.com", ); $payOpts[] = array( "title" => "Cancel Url", "fieldname" => "cancel_return", "value" => get_option('siteurl')."/?page=cancel_return&pmethod=skrill", "description" => "Example : http://mydomain.com/cancel_return.php", ); $payOpts[] = array( "title" => "Return Url", "fieldname" => "returnUrl", "value" => get_option('siteurl')."/?page=return&pmethod=skrill", "description" => "Example : http://mydomain.com/return.php", ); $payOpts[] = array( "title" => "Notify Url", "fieldname" => "notify_url", "value" => get_option('siteurl')."/?page=notifyurl&pmethod=skrill", "description" => "Example : http://mydomain.com/notifyurl.php", ); $paymethodinfo[] = array( "name" => 'Moneybookers or Skrill', "key" => 'moneybookers', "isactive" => '1', // 1->display,0->hide "display_order"=>'3', "payOpts" => $payOpts, ); //////////Moneybookers settings end//////// //////////google checkout start//////// $payOpts = array(); $payOpts[] = array( "title" => "Merchant Id", "fieldname" => "merchantid", "value" => "1234567890", "description" => "Example : 1234567890" ); $paymethodinfo[] = array( "name" => 'Google Checkout', "key" => 'googlechkout', "isactive" => '1', // 1->display,0->hide "display_order"=>'8', "payOpts" => $payOpts, ); //////////google checkout end//////// //////////authorize.net start//////// $payOpts = array(); $payOpts[] = array( "title" => "Login ID", "fieldname" => "loginid", "value" => "yourname@domain.com", "description" => "Example : yourname@domain.com" ); $payOpts[] = array( "title" => "Transaction Key", "fieldname" => "transkey", "value" => "1234567890", "description" => "Example : 1234567890", ); $paymethodinfo[] = array( "name" => 'Authorize.net', "key" => 'authorizenet', "isactive" => '1', // 1->display,0->hide "display_order"=>'9', "payOpts" => $payOpts, ); //////////authorize.net end//////// //////////worldpay start//////// $payOpts = array(); $payOpts[] = array( "title" => "Instant Id", "fieldname" => "instId", "value" => "123456", "description" => "Example : 123456" ); $payOpts[] = array( "title" => "Account Id", "fieldname" => "accId1", "value" => "12345", "description" => "Example : 12345" ); $paymethodinfo[] = array( "name" => 'Worldpay', "key" => 'worldpay', "isactive" => '1', // 1->display,0->hide "display_order"=>'4', "payOpts" => $payOpts, ); //////////worldpay end//////// //////////2co start//////// $payOpts = array(); $payOpts[] = array( "title" => "Vendor ID", "fieldname" => "vendorid", "value" => "1303908", "description" => "Enter Vendor ID Example : 1303908" ); $payOpts[] = array( "title" => "Notify Url", "fieldname" => "ipnfilepath", "value" => get_option('siteurl')."/?page=notifyurl&pmethod=2co", "description" => "Example : http://mydomain.com/2co_notifyurl.php", ); $paymethodinfo[] = array( "name" => '2CO (2Checkout)', "key" => '2co', "isactive" => '1', // 1->display,0->hide "display_order"=>'5', "payOpts" => $payOpts, ); //////////2co end//////// //////////pre bank transfer start//////// $payOpts = array(); $payOpts[] = array( "title" => "Bank Information", "fieldname" => "bankinfo", "value" => "ICICI Bank", "description" => "Enter the bank name to which you want to transfer payment" ); $payOpts[] = array( "title" => "Account ID", "fieldname" => "bank_accountid", "value" => "AB1234567890", "description" => "Enter your bank Account ID", ); $paymethodinfo[] = array( "name" => 'Pre Bank Transfer', "key" => 'prebanktransfer', "isactive" => '1', // 1->display,0->hide "display_order"=>'6', "payOpts" => $payOpts, ); //////////pre bank transfer end//////// //////////pay cash on devivery start//////// $payOpts = array(); $paymethodinfo[] = array( "name" => 'Pay Cash On Delivery', "key" => 'payondelevary', "isactive" => '1', // 1->display,0->hide "display_order"=>'7', "payOpts" => $payOpts, ); //////////pay cash on devivery end//////// /////////////////////////////////////// /* for($i=0;$i<count($paymethodinfo);$i++) { $paymethodArray = array( "option_name" => 'payment_method_'.$paymethodinfo[$i]['key'], "option_value" => serialize($paymethodinfo[$i]), ); $wpdb->insert( $wpdb->options, $paymethodArray ); //print_r(unserialize(serialize($paymethodArray))); }*/ //} for($i=0;$i<count($paymethodinfo);$i++) { $paymentsql = "select * from $wpdb->options where option_name like 'payment_method_".$paymethodinfo[$i]['key']."' order by option_id asc"; $paymentinfo = $wpdb->get_results($paymentsql); if(count($paymentinfo)==0) { $paymethodArray = array( "option_name" => 'payment_method_'.$paymethodinfo[$i]['key'], "option_value" => serialize($paymethodinfo[$i]), ); $wpdb->insert( $wpdb->options, $paymethodArray ); } } $paymentsql = "select * from $wpdb->options where option_name like 'payment_method_%'"; $paymentinfo = $wpdb->get_results($paymentsql); ?> <style> h2 { color:#464646; font-family:Georgia, "Times New Roman", "Bitstream Charter", Times, serif; font-size:24px; font-size-adjust:none; font-stretch:normal; font-style:italic; font-variant:normal; font-weight:normal; line-height:35px; margin:0; padding:14px 15px 3px 0; text-shadow:0 1px 0 #FFFFFF; } </style> <h2>Manage Payment Options</h2> <?php if($message){?> <div id="message" style="background-color: rgb(255, 251, 204);" > <p><?php echo $message;?> </p> </div> <?php }?> <table width="100%" > <thead> <tr> <th width="180"><strong>Method Name</strong></th> <th width="85"><strong>Is Active</strong></th> <th width="85" align="center"><strong>Sort Order</strong></th> <th width="85" align="center"><strong>Action</strong></th> <th width="85" align="center"><strong>Settings</strong></th> <th> </th> </tr> <?php if($paymentinfo) { foreach($paymentinfo as $paymentinfoObj) { $paymentInfo = unserialize($paymentinfoObj->option_value); $option_id = $paymentinfoObj->option_id; $paymentInfo['option_id'] = $option_id; $paymentOptionArray[$paymentInfo['display_order']][] = $paymentInfo; } ksort($paymentOptionArray); foreach($paymentOptionArray as $key=>$paymentInfoval) { for($i=0;$i<count($paymentInfoval);$i++) { $paymentInfo = $paymentInfoval[$i]; $option_id = $paymentInfo['option_id']; ?> <tr> <td><?php echo $paymentInfo['name'];?></td> <td><?php if($paymentInfo['isactive']){echo "Yes";}else{echo "No";}?></td> <td><?php echo $paymentInfo['display_order'];?></td> <td><?php if($paymentInfo['isactive']==1) { echo '<a href="'.get_option( 'siteurl' ).'/wp-admin/admin.php?page=paymentoptions&status=0&id='.$option_id.'">Deactivate</a>'; }else { echo '<a href="'.get_option( 'siteurl' ).'/wp-admin/admin.php?page=paymentoptions&status=1&id='.$option_id.'">Activate</a>'; } ?></td> <td><?php echo '<a href="'.get_option( 'siteurl' ).'/wp-admin/admin.php?page=paymentoptions&payact=setting&id='.$option_id.'">Settings</a>'; ?></td> <td> </td> </tr> <?php } } } ?> </thead> </table> |
Copy this code & overwrite in “admin_paymethods.php”
Thats all. Now go to Admin Panel & enjoy.
Please do this in your own risk & must be backup your file before do it.
Thanks
Hello,
Would you like to help me to implement a payment gateway in templatics eshop? It is a new gateway not listed in the theme. I ha e code examples, API description and more but don’t know where/how to do it…
I offer you ofcourse money for this.
Plz reply to my email if intrested!
Thx //ravve
Yes. I can
Hi again. Sorry didnt see your Reply until now…
Please send me an email and we’ll discuss further from there..
Appreciate your help man! 🙂
ravve@hotmail.com
Br //ravve