tdphong
-
Posts
31 -
Joined
-
Last visited
Posts posted by tdphong
-
-
Hi all,
Do the blesta have support old versions?
Thanks,
-
Hi all,
I develop a plugin use admin_manage_plugin.php file. Now, i want to use ajax for this file to pagination. I don't use admin_main.php file
So, how can i do that?
Thanks,
-
Thanks Tyson,
I done!
-
Hi all,
Currently, I use a method in plugin to call capture method in gateway. In capture method, i want to use $this->meta to call settings of gateway. But when i use it, it's not work, it return null value.
So, how can i do that?
Thanks,
-
Thanks all,
I use action "widget_staff_billing" to add my plugin in Billing navigate but it's not show. It just show on widget.
Please help me at here.
Thanks,
-
Hi naja7host,
Here is my code :
class AdminManagePlugin extends AppController {
/**
* Performs necessary initialization
*/
private function init() {
// Require login
$this->parent->requireLogin();
Language::loadLang("myGateway_manage_plugin", null, PLUGINDIR . "myGateway" . DS . "language" . DS);
$this->uses(array("myGateway.myGatewayOrder", "Transactions", "Services", "Packages"));
// Use the parent data helper, it's already configured properly
$this->Date = $this->parent->Date;
$this->plugin_id = isset($this->get[0]) ? $this->get[0] : null;
// Set the page title
$this->parent->structure->set("page_title", Language::_("myGatewayManagePlugin." . Loader::fromCamelCase($this->action ? $this->action : "index") . ".page_title", true));
return $this->renderAjaxWidgetIfAsync(isset($this->get['sort']) ? true : (isset($this->get[1]) || isset($this->get[0]) ? false : null));
}
/**
* Returns the view to be rendered when managing this plugin
*/
public function index() {
$this->init();
$status = (isset($this->get['status']) ? $this->get['status'] : "pending");
$page = (isset($this->get[1]) ? (int) $this->get[1] : 1);
$sort = (isset($this->get['sort']) ? $this->get['sort'] : "date_added");
$order_sort = (isset($this->get['order']) ? $this->get['order'] : "desc");
//print_r($status);exit;
if (isset($this->get[0]))
$status = $this->get[0];
// If no page set, fetch counts
if (!isset($this->get[1])) {
$status_count = array(
'pending' => $this->myGatewayOrder->getListCount("pending"),
'accepted' => $this->myGatewayOrder->getListCount("accepted"),
'fraud' => $this->myGatewayOrder->getListCount("fraud"),
'canceled' => $this->myGatewayOrder->getListCount("canceled"),
);
}
$statuses = $this->myGatewayOrder->getStatuses();
unset($statuses[$status]);
$order = array();
$total_results = $this->myGatewayOrder->getListCount(null);
$order['order'] = $this->myGatewayOrder->getList(null, $page, array($sort => $order_sort));
$feeds = $this->myGatewayOrder->getDefaultFeeds(Configure::get("Blesta.company_id"));
// Overwrite default pagination settings
$settings = array_merge(Configure::get("Blesta.pagination"), array(
'total_results' => $total_results,
'uri' => $this->base_uri . "settings/company/plugins/manage/" . $this->plugin_id . "/[p]/",
'params' => array('sort' => $sort, 'order' => $order_sort),
)
);
//$this->uses(array("Transactions", "Services", "Packages"));
// print_r($this->Transactions->getApplied(null, $order['order'][0]->id));exit;
$vars = array(
'feeds' => $feeds,
'plugin_id' => $this->plugin_id,
'status_count' => $status_count,
'orders' => $order['order'],
//'transaction_types' => $this->Transactions->transactionTypeNames()
);
$this->helpers(array("Pagination" => array($this->get, $settings)));
$this->Pagination->setSettings(Configure::get("Blesta.pagination_ajax"));
// Set the view to render for all actions under this controller
$this->view->setView(null, "myGateway.default");
return $this->partial("admin_manage_plugin", $vars);
}}
Please help me!
Thanks,
-
Thanks Tyson,
I done that!
URL is correct but when i click on pagination, it's not load page, in here ajax is not work.
I must refresh page that it work. Can you help me about this?
You can see images below.
Thanks,
http://uphinhnhanh.com/view-4893058_4.png
-
-
Thanks Tyson,
I get do it, that great!
-
-
Currently, i develop a plugin in plugins folder. Now, i want to call values of gateway(non-merchant) in component to this plugin.
So, how can i do that?
Thanks,
-
Hi Tyson,
So, how can i create a plugin to integrate both capture and refund button in a order?
Can you help me create a example plugin to i can follow it?
Thanks,
Phong
-
-
Thanks Tyson,
I will see my function again
-
Hi Tyson,
I don't understand clearly. Can you tell me about this?
So, when the Blesta upgrade, I have to do again the step above?
Thanks,
-
Hi all,
Currently, I am develop a payment method (a non-merchant). Here is the scenario:
1. In the checkout step, I send the data to the payment gateway using "buildProcess()" function.
2. After the payment processed, it will redirect to URL as below to run the "validate()" function:
http://localhost/blesta/callback/gw/1/mygateway/?client_id=1&invoice=121=600.0000¤t_currency=USD&default_currency=AUD
3. The "validate()" function will validate the gateway response to see the transaction is successful or failed.
Now I want in the case of successful payment it will redirect to the success page, otherwise it will redirect to the error page.
I see in the "validate()" function, it will return an array to log the transaction in DB. So how can I handle the redirect here?
Thanks,
Phong
-
Hi Tyson,
Our payment method support to authorize first in checkout then capture later in admin site. If the authorization is successful, I will mark order status as "Pending Capture" just for a meaningful status.
Thanks,
Phong
-
-
Thanks Tyson,
I got that . To create a connection to the database, How can I do it?
-
Thanks Tyson,
Currently, I'm developing a payment gateway in non-merchant. At step Pay & Complete Order, when i click Pay & Complete Order button, i want to get order number to send to my gateway. So, Please help me.
Thanks
-
Thanks Max,
So,How do I can get this array? Because I need to order number to send to my api gateway.
Please help me.
Thanks
-
Currently, I'm creating a new payment.I want to get order number to submit to my gateway.But, i can't do this.So, please help me.
I'm using non-merchant to create new payment.
Thanks,
-
Currently, i order a product and i wanna get order number which is created.So, how can i do it?
-
Hi all,
Currently, I'm creating a payment gateway, but this gateway just supported a currency which is AUD. Now, i want to convert amount of USD to amount of AUD. Please help me.
How To Disable Pay Past Due For My Gateway
in Extensions
Posted
Hi all,
Currently, I'm developing a payment gateway and this gateway want not support from pay past due.
So, I want to disable my gateway when client use pay past due. How do I can that?
Please help me. You can see images as attached.
Thanks,
Phong