pureevil78 Posted December 15, 2014 Report Posted December 15, 2014 Im thinking of using blesta as a payment gateway but i would require it to take a username & userID take payment once its success full send the information to another database is this possible Quote
0 Paul Posted December 15, 2014 Report Posted December 15, 2014 Blesta isn't a payment gateway, do you mean to have Blesta process payment for something (through a payment gateway) and then update another database? When a service is provisioned, the module it uses is called. With a custom provisioning module, you could have those services perform a query on another database when the order is activated, suspended, unsuspended, or cancelled. Is that what you're looking to do? Quote
0 pureevil78 Posted December 15, 2014 Author Report Posted December 15, 2014 yes mate thats it.. something like this.. SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $id, $dt, $msg, 0)"); SQL_Query_exec("UPDATE `users` SET `title` = " . sqlesc($title) . ", `vipforever` = " . sqlesc($forever) . ", `donated` = `donated` + " . $p->ipn_data['mc_gross'] . ", `seedbonus` = `seedbonus` + $points, `invites` = `invites` + $invite, `uploaded` = `uploaded` + $gigs, `donor` = 'yes', `donoruntil` = $expirydate, `class` = $class WHERE `id` = " . $p->ipn_data['custom'] . ""); SQL_Query_exec("UPDATE `site_settings` SET `donations` = `donations` + '$payment_amount'"); write_log($row['username'] . " has donated " . $p->ipn_data['mc_gross'] . $p->ipn_data['mc_currency'] . $message .''); Quote
0 Paul Posted December 15, 2014 Report Posted December 15, 2014 A custom module should be able to do that for you. The only potential issue I see is that modules typically don't have access to transaction data, but you can probably assume that based on the package price. Also, if these are donations are they pre-defined? If the user enters the donation amount, a more complete solution may be required. Quote
0 pureevil78 Posted December 15, 2014 Author Report Posted December 15, 2014 There all pre-defined amounts.. i have this page that works with paypal but people are complaining about using euros and not there currency and also paypal charges and wanting too much personal info, im planning on trying to use, paypal, skrill, google wallet and also bitcoin if poss if ($payment_amount == 2){ $expires = get_date_time(gmtime() + (86400 * 2)); // 2Day $gigs = 2147483648; // 1 GB $points = 0; $invite = 1; }elseif ($payment_amount == 10){ $expires = get_date_time(gmtime() + (86400 * 28)); // 4 Weeks $points = 0; $gigs = 21474836480; // 20 GB $invite = 2; }elseif ($payment_amount == 20){ $points = 0; $expires = get_date_time(gmtime() + (86400 * 56)); // 8 Weeks $gigs = 53687091200; // 50 GB $invite = 3; /////////////////////////////////////// }elseif (($site_config["VIPSPECIAL25"] && $payment_amount == 25)) { $points = 0; $expires = get_date_time(gmtime() + (86400 * 196)); // 28 Weeks $gigs = 1073741824000; // 1000 GB - 1TB $invite = 10; $forever = 'yes'; $title = 'Lifetime VIP Member'; //////////////////////////////////////// }elseif ($payment_amount == 30){ $points = 0; $expires = get_date_time(gmtime() + (86400 * 84)); // 12 Weeks $gigs = 134217728000; // 125 GB $invite = 4; }elseif ($payment_amount == 40){ $points = 0; $expires = get_date_time(gmtime() + (86400 * 112)); // 16 Weeks $gigs = 268435456000; // 250 GB $invite = 5; }elseif ($payment_amount == 50){ $points = 0; $expires = get_date_time(gmtime() + (86400 * 196)); // 28 Weeks $gigs = 644245094400; // 600 GB $invite = 6; }elseif ($payment_amount == 100){ $points = 0; $expires = get_date_time(gmtime() + (86400 * 5475)); // One Years Time.... $gigs = 1073741824000; // 1000 GB - 1TB $invite = 10; $forever = 'yes'; $title = 'Lifetime VIP Member'; } Quote
Question
pureevil78
Im thinking of using blesta as a payment gateway
but i would require it to take a username & userID take payment once its success full send the information to another database
is this possible
4 answers to this question
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.