Jump to content
  • 0

Pre-Sales Question


pureevil78

Question

4 answers to this question

Recommended Posts

  • 0

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?

Link to comment
Share on other sites

  • 0

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 .'');
Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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';

  }

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
Answer this question...

×   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.

Loading...
×
×
  • Create New...