Jump to content

Black-Xstar

Members
  • Posts

    10
  • Joined

  • Last visited

Black-Xstar's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks. How do I access database? Can I use install() method to init the DB?
  2. Thank you! That is exactly I am asking. I will try you code snippet. Thanks again!
  3. @serge: you are right, sorry for my typo. Blesta only provides amount and invoices array to buildProcess(): * @param float $amount The amount to charge this contact * @param array $invoice_amounts An array of invoices I can't serialize the array and send to gateway because gateway only accept integers. So I need a DB/table to save (id, invoices array) pair. When the blesta receive id from gateway, I can mark those invoices as paid. Using order ID is a good idea. But if people renew their services or just add credit to account, how can I get this order ID? PS: I know what is transaction identifier but I am not talking about the transaction identifier. Thanks.
  4. Since blesta doesn't offer unique ID for each payment. I have to use another database to save the unique ID. So, how to do it? I need create a table when payment gateway activated and run query inside the gateway functions. Here is my scene: 1) buildProcess() will generate unique ID and save (id, invoices array) pair to database as well as send unique ID to payment gateway. 2) User pay at gateway's website and back to blesta. Gateway will send data to blesta return_url. 3) success() will receive GET data from payment gateway. The data included same unique ID above and transaction identifier generated by gateway. 4) To get the invoices array from database by using unique ID mark those invoices as paid.
  5. It would be nice if blesta support Stripe JS checkout.
  6. Yes. Just a simple check function. Can you provide a example by using getByTransactionId()? Thanks. I know blesta won't record same transaction to database. But it sent 'Payment Received' email (blesta.url/admin/tools/logs/email/) every time when it received a call back request
  7. I want the callback URL return a "success" message to gateway directly. It can NOT be a new GET request from blesta. Because if the callback URL don't return a "success" message, the gateway will keep POST to callback URL every hour. UPDATE: I figured out. Just add echo "success" to public function validate(array $get, array $post) {} will do the trick. Another question: Is there any way to check callback already recorded? Like checkCbTransID($transid) in WHMCS: http://docs.whmcs.com/Gateway_Module_Developer_Docs#Callbacks
  8. Hi @Tyson, I want to response gateway's callback, not send a new request to gateway. For example, Gateway send a request ($_POST) to callback URL: https://example.com/callback/gw/1/mygateway/?client_id=1 I want this URL response "success" to gateway.
  9. I am developing a non merchant gateway. I followed the demo here: https://github.com/phillipsdata/blesta_sdk/blob/master/components/gateways/nonmerchant/nonmerchant_demo/nonmerchant_demo.php This function: public function validate(array $get, array $post) {} Will handle the gateway callback. If the blesta received the callback (HTTP Request), how to return a HTTP Response to gateway? For example, the gateway posted data ($_POST) to callback url, it should return text 'success' to gateway, so the gateway will not post again. If the blesta can not return anything to gateway, how to check this transaction already recorded? Because the gateway may post many times. For example, in WHMCS, I can use checkCbTransID($transid) to do it: http://docs.whmcs.com/Gateway_Module_Developer_Docs#Callbacks Thanks.
×
×
  • Create New...