kemeris
-
Posts
12 -
Joined
-
Last visited
Posts posted by kemeris
-
-
Thank you PauloV, waiting for next release
-
Great, thank you naja7host
-
Hi!
I'm wondering is it possible to add new ticket to Support manager plugin remotely via API .
Thanks.
-
-
$return->response() and $return ->errors() are empty, but $return itself is not:
header("Content-Type: text/plain"); print_r($return);
BlestaResponse Object ( [raw:BlestaResponse:private] => <pre>Array ( [id] => 1 [client_id] => 2 [user_id] => 3 [first_name] => Tadas [last_name] => Blinda [country] => Array ( [alpha2] => LT [alpha3] => LTU [name] => Lithuania [alt_name] => Lietuva ) [state] => Array ( [country_alpha2] => LT [code] => VL [name] => Vilniaus Apskritis ) ) </pre><pre>9.9</pre><pre>EUR</pre><pre>Array ( [67] => 9.90 ) </pre><pre>Array ( [recur] => Array ( [amount] => 9.90 [term] => 1 [period] => month ) [description] => Invoice #PROFORMA-37 [return_url] => http://xx.xx.x.xx/blesta/order/checkout/complete/xxxxx/57d297b657a49 ) </pre><pre>1</pre>{"response":{"paypal_payments_standard":["\n\t<form method=\"post\" action=\"https:\/\/www.sandbox.paypal.com\/cgi-bin\/webscr\">\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" \/>\n<input type=\"hidden\" name=\"business\" value=\"kemeri_1320439495_biz@asista.lt\" \/>\n<input type=\"hidden\" name=\"page_style\" value=\"\" \/>\n<input type=\"hidden\" name=\"item_name\" value=\"Invoice #PROFORMA-37\" \/>\n<input type=\"hidden\" name=\"amount\" value=\"9.9\" \/>\n<input type=\"hidden\" name=\"currency_code\" value=\"EUR\" \/>\n<input type=\"hidden\" name=\"notify_url\" value=\"http:\/\/localhost\/blesta\/callback\/gw\/1\/paypal_payments_standard\/?client_id=2\" \/>\n<input type=\"hidden\" name=\"return\" value=\"http:\/\/xx.xx.x.xx\/blesta\/order\/checkout\/complete\/xxxxx\/57d297b657a49\" \/>\n<input type=\"hidden\" name=\"rm\" value=\"2\" \/>\n<input type=\"hidden\" name=\"no_note\" value=\"1\" \/>\n<input type=\"hidden\" name=\"no_shipping\" value=\"1\" \/>\n<input type=\"hidden\" name=\"first_name\" value=\"Tadas\" \/>\n<input type=\"hidden\" name=\"last_name\" value=\"Blinda\" \/>\n<input type=\"hidden\" name=\"address1\" \/>\n<input type=\"hidden\" name=\"address2\" \/>\n<input type=\"hidden\" name=\"city\" \/>\n<input type=\"hidden\" name=\"country\" value=\"LT\" \/>\n<input type=\"hidden\" name=\"zip\" \/>\n<input type=\"hidden\" name=\"charset\" value=\"utf-8\" \/>\n<input type=\"hidden\" name=\"bn\" value=\"PhillipsData_SP\" \/>\n<input type=\"hidden\" name=\"custom\" value=\"67=9.90\" \/>\n<input type=\"image\" name=\"submit\" value=\"Pay with PayPal\" src=\"https:\/\/www.paypalobjects.com\/en_US\/i\/bnr\/horizontal_solution_PP.gif\" alt=\"Pay with PayPal\" \/>\n<\/form>\n","\n\t<form method=\"post\" action=\"https:\/\/www.sandbox.paypal.com\/cgi-bin\/webscr\">\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick-subscriptions\" \/>\n<input type=\"hidden\" name=\"business\" value=\"kemeri_1320439495_biz@asista.lt\" \/>\n<input type=\"hidden\" name=\"page_style\" value=\"\" \/>\n<input type=\"hidden\" name=\"item_name\" value=\"Invoice #PROFORMA-37\" \/>\n<input type=\"hidden\" name=\"currency_code\" value=\"EUR\" \/>\n<input type=\"hidden\" name=\"notify_url\" value=\"http:\/\/localhost\/blesta\/callback\/gw\/1\/paypal_payments_standard\/?client_id=2\" \/>\n<input type=\"hidden\" name=\"return\" value=\"http:\/\/xx.xx.x.xx\/blesta\/order\/checkout\/complete\/xxxxx\/57d297b657a49\" \/>\n<input type=\"hidden\" name=\"rm\" value=\"2\" \/>\n<input type=\"hidden\" name=\"no_note\" value=\"1\" \/>\n<input type=\"hidden\" name=\"no_shipping\" value=\"1\" \/>\n<input type=\"hidden\" name=\"first_name\" value=\"Tadas\" \/>\n<input type=\"hidden\" name=\"last_name\" value=\"Blinda\" \/>\n<input type=\"hidden\" name=\"address1\" \/>\n<input type=\"hidden\" name=\"address2\" \/>\n<input type=\"hidden\" name=\"city\" \/>\n<input type=\"hidden\" name=\"country\" value=\"LT\" \/>\n<input type=\"hidden\" name=\"zip\" \/>\n<input type=\"hidden\" name=\"charset\" value=\"utf-8\" \/>\n<input type=\"hidden\" name=\"bn\" value=\"PhillipsData_SP\" \/>\n<input type=\"hidden\" name=\"custom\" \/>\n<input type=\"hidden\" name=\"a1\" value=\"9.9\" \/>\n<input type=\"hidden\" name=\"p1\" value=\"1\" \/>\n<input type=\"hidden\" name=\"t1\" value=\"M\" \/>\n<input type=\"hidden\" name=\"a3\" value=\"9.9\" \/>\n<input type=\"hidden\" name=\"p3\" value=\"1\" \/>\n<input type=\"hidden\" name=\"t3\" value=\"M\" \/>\n<input type=\"hidden\" name=\"modify\" value=\"0\" \/>\n<input type=\"hidden\" name=\"src\" value=\"1\" \/>\n<input type=\"image\" name=\"submit\" value=\"Pay with PayPal\" src=\"https:\/\/www.paypalobjects.com\/en_US\/i\/btn\/btn_subscribeCC_LG.gif\" alt=\"Pay with PayPal\" \/>\n<\/form>\n"]}} [response_code:BlestaResponse:private] => 200 )
I have tried to make payment for same invoice from Blesta, everything is fine there.
Where I can find Blesta debug documentation?
-
Other requests works fine, bl_getState function works but bl_getBuildProcess do not
function bl_getState($country, $code) { $response = bl_API()->get("States", "get", array("country" => $country, "code" => $code)); if ($response->errors()) { return $response->errors(); } else { return $response->response(); } } function bl_getBuildProcess($contact_info, $amount, $currency, $invoice_amounts, $options, $gateway_id) { $response = bl_API()->get("Payments", "getBuildProcess", array("contact_info" => $contact_info, "amount" => $amount, "currency" => $currency, "invoice_amounts" => $invoice_amounts, "options" => $options, "gateway_id" => $gateway_id)); if ($response->errors()) { return $response->errors(); } else { return $response->response(); } }
Here is my full code, I am defining variable values manually for now.
$contact_info = array ( "id" => 1, "client_id" => 2, "user_id" => 3, "contact_type" => null, "contact_type_id" => null, "first_name" => "Tadas", "last_name" => "Blinda", "title" => null, "company" => null, "address1" => null, "address2" => null, "city" => null, "zip" => null, "country" => Array ( "alpha2" => "LT", "alpha3" => "LTU", "name" => "Lithuania", "alt_name" => "Lietuva" ), "state" => Array ( "country_alpha2" => "LT", "code" => "VL", "name" => "Vilniaus Apskritis" ) ); $amount = 9.90; $currency = "EUR"; $invoice_amounts = array( 67 => "9.90" ); $options = array( 'recur' => array( 'amount' => 9.90, 'term' => 1, 'period' => "month" ), 'description' => 'Invoice #PROFORMA-67', 'return_url' => 'http://xx.xx.x.xx/blesta/order/checkout/complete/xxxxx/57d297b657a49' ); $gateway_id = 1; $return = bl_getBuildProcess($contact_info, $amount, $currency, $invoice_amounts, $options, $gateway_id); print_r($return);
-
Hi, I am trying to get HTML markup for PayPal standard gateway via API.
function bl_getBuildProcess($contact_info, $amount, $currency, $invoice_amounts, $options, $gateway_id) { require_once "blesta_api.php"; $api = new BlestaApi($config->bl_api_url, $config->bl_api_user, $config->bl_api_key); $response = $api->get("Payments", "getBuildProcess", array("contact_info" => $contact_info, "amount" => $amount, "currency" => $currency, "invoice_amounts" => $invoice_amounts, "options" => $options, "gateway_id" => $gateway_id)); return $response; } $return = bl_getBuildProcess( array(client_id => 2), 9.90, "EUR", array(40 => 9.90), array(), 2);
I get empty $return->response() and $return ->errors() is
stdClass Object ( [error] => )
any ideas what is wrong with my code?
-
Tyson, thank you for the detailed answer
-
Hi,
Playing with blesta API to integrate it to out site. List, Add, Validate service all works good. Now I need to render checkout page similar to Blesta. Do I need to make separate API calls to "get" checkout page items (Service options, Payment methods, Order symmary) or there is another way to get whole checkout page at once?
Best regards
-
-
I have two service options in universal module. Can anyone tell me how to get these options for a given service via API?
Thanks
Language switcher problem
in Support
Posted
Hi,
I have made a copy of default bootstrap client template and trying to modify it to my needs.
My problem is language switcher on my template does not work.
Once I click language title from homepage, browser redirects me to login page (mywebsite.com/client/login/) instead of changing language. Language switcher does work on default bootstrap template.
I use unmodified language switcher code, all blesta scripts and css files are included in my template.
On browser inspector I see form is submitted, with three params:
Any ideas what could be a problem?
Thanks in advance