Create task in bitrix - php

I need to create task in bitrix from my website form. When a user submit form from my website Client needs to create it as a task in bitrix and automatically assigned to user.

You can use incoming webhook.
To create a webhook, go to Applications > Webhooks.
Click the Add webhook button in the upper right corner and select Inbound webhook.
In the form that opens, fill in the fields:
Title and Description - arbitrary data.
Access rights - indicate
which modules the webhook should have access to.
After saving, a code for webhook authorization will appear.
Together with the code, a sample URL will be presented, which must be used when sending data from a third-party system to Bitrix24: https://********.bitrix24.ru/rest/1/83te1pjdphsa9u15/task/
Where:
******** - the name of your portal;
/rest/ - indication to the system that this address belongs to webhooks;
/1/ - identifier of the user who created the webhook. This webhook will work under the rights of this user.
/83te1pjdphsa9u15/ - secret code;
/tasks.task.add is the REST method that you want to execute when accessing a web hook. The developer must choose the method from the REST API himself, depending on the goals of creating a webhook. Documentation with REST API task methods
Use curl(for example) into code of your website.

Use special solution "task from email".
https://marketplace.1c-bitrix.ru/solutions/mcart.taskfromemailce/

Related

Stripe: How To Avoid Calling The API Too Often?

I am building a (small) subscription box business and I now need to focus on the web app. I already built stripe-based websites so I have a decent knowledge.
However, the issue I faced when building these previous sites is that the API was called TOO OFTEN. It slowed everything down.
How to build this subscription-based website, only with stripe, and making calls to Stripe API only when required (create/edit a customer, plan, subscription, etc.) while still making sure information is reconciled and up-to-date on the website for both admin and clients?
Check out the Stripe Webhook API here: https://stripe.com/docs/webhooks
You can store the user's information in the database and only update those fields if the user makes a UI action and you can make an assumption on what to update (like a subscription plan ID) or using a webhook handler, which you can use as a sanity check as well.
To be even more specific, I can give some examples as you will still need to make API calls when a user does an action such as: creates an account, removes their subscription, subscribes to a different subscription. You will store when their subscription expires in the database. When the user makes a request you do not make an API call to check when their subscription expires, but check the database field. When the subscription renews itself you will then have a webhook handler to update the expiration date in the database.
Essentially how it works is Stripe will make a request to YOUR service only when it needs to, instead of your service calling to Stripe on every request.
For WordPress specifically you can user the User Meta Data to cache/store the user's information and only make calls to your database for faster transactions. http://codex.wordpress.org/Function_Reference/get_user_meta

Perform POST Request from a Controller in Symfony2

I need to integrate a virtual POS (Point of Sale) with my eCommerce website made in Symfony2.
The system is simple: the client has to perform a POST request to a given URL, with few parameters; then from my website the client will be redirected to the bank POS page where he/she can pay the orders.
The problem is that I don't want to send to the client any of the POST parameters in the HTML (because they are sensitive: passwords and signatures), so I am wondering how to achieve that in my Symfony2 environment.
Have a look at cUrl in PHP: http://ch2.php.net/manual/en/book.curl.php
You can do POST requests with that from PHP.
Maybe this example helps: http://wiki.uniformserver.com/index.php/PHP_cURL:GET%26_POST#Example_11_-_cURL_POST

How can we use Google Play Service for back-end server validation?

I was following these articles: Verifying Back-End Calls from Android Apps and Stopping Vampires using License Verification Library (from 24:57 to 25:34) to implement an In-App Purchase verification system for our Android apps.
I am a bit confused about how this works end-to-end and what we can assume about the generated token from calling GoogleAuthUtil.getToken() with the first email address found--when AccountManager returns more than one account. My questions are as follows:
Should we assume that any e-mail address used by the user to buy our
app will generate the same token (i.e., same user + app ==> same
token)?
If the answer to question 1 is no, is there a way to launch in-app
purchase for a particular account/email?
It looks like Google is picking the first e-mail address returned by
AccountManager for its in-app purchase dialog. Can we assume that
this won't be changed by the user after in-app purchase dialog is
launched? How do we find out if this changed after the in-app
purchase returns?
What should we store in our database to identify this user? Is email
address and/or token allowed? When does the token expire?
The java-client library looks very promising and powerful at first
read. But, a number of things remains confusing. Is there an article
that describes the end-to-end scenario--from an app initiating a
call to a back-end server through launching the in-app purchase
dialog, getting the result and closing with commits on the server?
What articles are the most useful for accomplishing this on Android?
The main issue we are trying to solve is to to get the full picture.
We've gotten the idea that we can avoid requiring userid/password by using the java client features and using tokens. We have registers our project (both the web app and android app on the same project) per the instructions for Google API Console. We have the php java-client for Google Play Service on our back-end server. We got our Android app to generate a token using the first email address and then call the in-app purchase dialog and handle the user response at the end of the dialog. We've got the parts. Now, we need to glue everything together. We are at the point of integrating with the back-end server. E.g., What is Redirect URi supposed to point to in our server? We've got a php url that we do http post messages to for our server app. We've included the code example for Google API client example--with client-id, secret, simple api key, etc. filled in--as an include to our php. But, what should we put in the redirect uri (we are missing a usage instruction for the example code)?
Also, we want to avoid having the e-mail used for the in-app purchase be different from what we log on our server database as the address the user used to buy our app; if the address is the correct thing to track, we want it to be the same as what was used for the purchase. This could be frustrating for our user if we make this mistake and prevent them from the features they paid for. We don't want to make this mistake and need some clarification on how Google Play Service works. If we initiated the server part of the workflow to get app Nonce / Payload / Credentials for the first e-mail address on the Android device, we would want that address to be used throughout the workflow. If the user changed this along the line, we want to be aware of this and gracefully recover. So far the articles have been helpful but incomplete. Any insight/suggestion is appreciated.

How to create infusionsoft plugins that will communicate with mongoosemetrics APIs?

I am a senior PHP developer, but I'm newbie with Infusionsoft. My client has the requirements below:
Create a plugin in Infusionsoft to trigger an event at the time of affiliate registration with a affiliate traceable phone number via Mongoose API.
Create a plugin in Infusionsoft to trigger an event at the time of affiliate login which will send a affiliate traceable phone number via Mongoose Metrics API and send a response with call details/statistics to the Infusionsoft server.
I actually do not where and how to create a plugin in Infusionsoft and how to call Mongoose Metrics API in it.
Can anybody please give me step-by-step info if possible so that I can work through this faster?
If you are using a webform for your affiliates to signup you can have Infusionsoft send a POST with the information the affiliate used in the form to a script which would add the number to mongoose api.
If you are manually creating affiliates inside infusionsoft then there is no automatic listener to send the information, a post would have to be setup in an actionset and run manually on the affiliate's contact record. If you are not familiar with action sets you can read about them here
As far as the second plugin there is no way to run an action when an affiliate logs in. You might be able to do some magic if you find a way to add HTML/Javascript to the affiliate login page and send that information to your server. However, that is a very ugly way to do it.

php notification

how to make a notification code in php?
when user make a booking request
how to notify admin that there were incoming booking request?
There are several possibilities, including:
Send an email notification to a known address
Use a database trigger to populate a view that the admin user will see on their app's page
Write a message to a queue (such as AMQP) that will be read by another application.

Categories