Jump to content

sktan

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by sktan

  1. I think I tried that and also forced a gateway upgrade by changing the version number, but the gateway name showed to clients is determined by what's stored on the database (which doesn't change).
  2. sktan

    Blesta Billing Email

    Thanks for that! That's an odd place to store the email addresses. I didn't even think to look there
  3. sktan

    Blesta Billing Email

    Hey, I've been looking around blesta but couldn't find a way to change the email address for when emails get sent out. At the moment I've got the installation on a subdomain e.g billing.shop.com and invoice emails are being sent from "billing@billing.shop.com" How would I go about changing the email address so it gets sent from "biling@shop.com"? Thanks!
  4. That wouldn't work too well when you have a client with 2 free services and 2 paid services (of the same package) although it isn't a bad idea.
  5. Hey, I'm trying to override a service's total price and have tried the "override-price" option but that seems to only override the base package. I'd like to avoid the use of coupons as I see no way to lock the coupons to only allow specific users to activate it which means that coupons can be abused (e.g. 100% discount coupons being re-used by clients by figuring out the coupon code). It would also be great if this was also available in the "create service" area when creating a new service for a client as at the moment, I don't seem to be able to override a price as I'm manually creating a service for the client. Also an option to allow us to give the service for free would be a good idea so we can provision free services to clients without them being invoiced for $0 which ties in with the price-override as I'm looking to override the total cost of the service to $0/month. Thanks!
  6. Hey, I'm trying to override a service's price and have tried the "override-price" option but that seems to only override the base package. So far, I've yet to figure out a way to override both the package and all configurable options like the way that the "coupons" does it. I'm trying to avoid the use of coupons as I see no way to lock the coupons to only allow specific users to activate it which means that coupons can be abused. Does blesta support this? Or a method to make entire services (both service + config options) free? Thanks!
  7. sktan

    Invalid Invoice Ids

    After testing with a clean $10 invoice and the payment showing up fine, it looks as though they're the same bug.
  8. sktan

    Invalid Invoice Ids

    Thanks! If they're related, it would really be a huge relief as I was really wondering what I did wrong as according to comparisons I made my code-changes shouldn't've changed anything that badly.
  9. It's still in testing / development phase, and definitely not ready for a public release. I'll be sure to post updates as I go along and find new methods to solve my problems.
  10. sktan

    Invalid Invoice Ids

    Yes, it's being returned as an array.
  11. sktan

    Invalid Invoice Ids

    Yes, it is a custom gateway that's currently in development. I'll have a further look at it as code-changes may have broken everything as it was working before. The last screenshot shows the Gateway::validate return values. Is there something you can see that's missing? StripeJs::success|return {"client_id":"1","amount":8.06,"currency":"AUD","status":"approved","reference_id":"ch_XXXXXXX","transaction_id":"ch_XXXXXXXXX","parent_transaction_id":null,"invoices":[{"id":"80","amount":"8.0645"}]} That's the log of the Success function if that's required as well
  12. As it turns out my logging of the "success" function was kind of wrong. It only gets called when paying for invoices via the dashboard, whereas if you're ordering a new product and get redirected from the payment gateway back to blesta, it's not being called as it should. I'm still trying to find the most effective solution to capture / build a payment authorisation form afterr being redirected from the gateway. I'd rather not create a hacky-implementation around the notify URL, although that seems as though it's the best option so far. @naja7host I appreciate you sharing your code in order to help me. We both still fall into the same problem though when attempting to use pre-authorised billing agreements. Update: I've figured out a hacky-implementation of capturing payment tokens for future use. Since the only method that seems available for us to use is "buildProcess", I've decided to use that in order to capture and authorize payments public function buildProcess(array $contact_info, $amount, array $invoice_amounts=null, array $options=null) { // Builds our return_url based on the current page the client is on (also adds HTTP/s if supported) $this_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https://" : "http://"; $this_url .= $_SERVER['HTTP_HOST']; $this_url .= $_SERVER['REQUEST_URI']; $options['return_url'] = $this_url; ...... } This allows PayPal to return back to the buildPayment URL so we can then use the token passed back via a GET parameter in order to finalize our transaction. Obviously not the best implementation that can be done, but it gets the job done.
  13. sktan

    Invalid Invoice Ids

    Hmm, Okay. Although when I pay for the invoice, it seems all good according to logs but the payments aren't being applied to that particular invoice I've paid for.
  14. sktan

    Invalid Invoice Ids

    I've found a bug where invoice numbers don't seem to match the ones being paid for. i.e I press "Pay" for Invoice #79, it takes me to /invoice/pay/80 and the Gateway pays for invoice 80 leaving invoice #79 unpaid. Not too sure how I got that to occur, but any payments have been made successfully for Invoice #80 but invoice #79 remains unpaid for. Open Invoices: Pay URL + UI: Result:
  15. I appreciate your help so far. I've already logged the function calls, and I'm stuck attempting to find a way to request the paypal payment as after returning from paypal. What' I've found is that the "success" method isn't invoked when the client lands back on the 'success' page as documentation implies, it is actually invoked as (I'm not too sure) the gateway gets notified of the payment being successful / unsuccessful (the IPN callback). If anyone can help me with these queries, it would be also greatly appreciated: Is it possible to redirect the client back to blesta (after their billing agreement) so that the NonMerchantGateway::getBuildAuthorize() method gets called in order for me to show the authorize page and then request their payment. Is there a way for me to modify the view of the credit-card forms for merchant-gateways so StripeJS can be used?
  16. Sydney here, and dont think Blesta is big enough to have it's own little club yet.
  17. Oh right, yes I see what you mean I was wrong in my assumption although that is somewhat unrelated to what I require. Currently for non-merhant gateways, the process goes similar to this: Order form -> Press Paypal Button -> Payment processes then notifies IPN -> Invoice Success! What I want is Order Form -> Press Paypal Button -> Buyer agrees to billing agreement -> returns to confim page -> Buyer confirms payment -> Gateway uses token in GET parameter to request payment -> Paypal confirms payment -> Invoice success! Then for recurring payments: Automatic Billing Cron -> Invoice Generated -> Paypal Gateway process payment -> Gateway sends another payment request using the token -> Invoice payment success! Currently the only methods for automatic billing which are support are the merchant ones. I'd like to stay away from merchant gateways as I'd rather blesta not touch any of the credit card details what so ever. I've noticed that blesta does maybe support this feature although the documentation is unclear as to if it's supported or unsupported. http://docs.blesta.com/display/dev/Non-merchant+Gateway+Methods#Non-merchantGatewayMethods-buildAuthorize%28array$contact_info,$amount,array$invoice_amounts=null,array$options=null%29 It does say the capture method is un-supported, although there is no mention in the buildAuthorize page which would most-likely be perfect for my case.
  18. My problem isn't the understanding of what the capturing does. It's the method of implementing the tokens and recurring payments that's is where I'm stuck as non-merchant gateway methods don't seem to be designed for that. And modifying the UI of merchant-gateways has lead me nowhere as I can't figure out which controller handles the input of the CC details after the order form. E.g. for Paypal, we get returned to the Success URL with a token in as a GET parameter but I haven't found a way to access the GET parameter in order to use the token for the next step of the tokenized payment process. https://developer.paypal.com/docs/classic/express-checkout/ht_ec-refTrans-SetEC-DoRefTrans-curl-etc/ Also if I were to program the StripeJS gateway, I'd have to edit the views for the various credit card inputs which means editing core files as blesta does not currently support views within the gateways (from what I've read in the docs). So in order to implement both gateways, I'm still looking for the simplest methods that allows for easy intergration whilst minimising the modification of the core blesta views / models / controllers.
  19. Hi, At the moment I'm working on a non-merchant payment-gateway for paypal / stripe which uses tokens / references in order to charge pre-authorised payments out of the client's account. An issue I've come across is that the current Blesta non-merchant payment gateways dont seem to seem to support the 'capture' method which I assume should be called when new invoices are processed so we can use the payment references / tokens in order to process new payments. Currently I see that I may need to modify the blesta/components/gateway_payments/gateway_payments.php and most probably some controller/model/other files in order to add the funcionability to be able to use pre-authorised payments. Is there a way I can get around this? (The event hooks documentation doesn't show much information) Thanks,
  20. That would actually make loads of sense. That has definitely solved my problem (thought it would retrieve the fields automatically) Thanks alot!
  21. At the moment, the "getFieldsFromInput" function looks like this. private function getFieldsFromInput($vars, $package) { $fields = array( 'game_id' => $package->meta->game_id, 'server_name' => isset($vars['gsp_server_name']) ? $vars['gsp_server_name'] : null, 'rcon_password' => isset($vars['gsp_rcon_password']) ? $vars['gsp_rcon_password'] : null, 'machine_location' => isset($vars['gsp_machine_location']) ? $vars['gsp_machine_location'] : null, 'extra_slots' => isset($vars['configoptions']['ExtraSlots']) ? $vars['configoptions']['ExtraSlots'] : 0, 'slots' => isset($package->meta->default_slots) ? $package->meta->default_slots : null, ); if(isset($vars['configoptions']['slots'])) { $fields['slots'] = $vars['configoptions']['slots']; } if(isset($vars['configoptions']['dedicated'])) { $fields['dedicated'] = $vars['configoptions']['dedicated']; } return $fields; } And the logs from the function params have been attached as a .txt file. addService.txt
  22. Hey, I'm creating a module, and ran into a problem when attempting to provision a service. Heres my current 'addService' code. public function addService($package, array $vars=null, $parent_package=null, $parent_service=null, $status="pending") { $params = $this->getFieldsFromInput((array)$vars, $package); // logging functions here return array( array( 'key' => 'gsp_game_id', 'value' => $params['game_id'], 'encrypted' => 0, ), array( 'key' => 'gsp_machine_location', 'value' => $params['machine_location'], 'encrypted' => 0, ), array( 'key' => 'gsp_server_name', 'value' => $params['server_name'], 'encrypted' => 0, ), array( 'key' => 'gsp_rcon_password', 'value' => $params['rcon_password'], 'encrypted' => 0, ), array( 'key' => 'gsp_slots', 'value' => $params['slots'], 'encrypted' => 0, ), array( 'key' => 'gsp_extra_slots', 'value' => $params['extra_slots'], 'encrypted' => 0, ), ); } The service fields get stored on my DB when the client orders the package and the status is 'pending', but when I activate the product the values that's been saved as a service field isn't passed onto the $vars variable which then over-writes the data as null. Is there any way to grab the service fields from the DB once the package is active? or am I doing something horribly wrong.
×
×
  • Create New...