I like to use Initialize Variable action in my logic app. I have looked at the online documentation for Logic App Actions; however i can not find documentation for Initialize Variable action.
Where can i find documentation for all Logic App actions?
Apologies this feature just got released but documentation is incoming for specifics. Any specific questions I can help with in the meantime? Today you can initialize to any number - but you cannot initialize a variable within a scope (must be global). Coming in next few weeks will be support strings, and then complex objects like arrays/collections
Related
I have a question to the stackoverflow community. I'm working with some payment stuff which has given me an private key that I would need to use in order to call their endpoints.
Storing the keys in environment is quite easy and I've done it before for smaller projects. But my question is.. Is that really the best way of doing it?
Since the project is built in NextJS (react), would you store the private keys in the environment and then collect them via the getServerSideProps function or?
I'm just interested in hearing your opinions and what would be the best way to solve this. My goal is to have it as secure as possible. I'll therefore be more than happy to take an extra step or two to solve this.
What does the stackoverflow community think about this? How are YOU storing your private keys.
(I am googling in the backround and reading some blog posts. If I find something that makes sense, then I'll share it here for the next person with same questions as me)
Storing sensitive keys inside the application is a no no. What you can do is inject them into your application using environment variables. Then whenever you deploy your application, pass the keys as env variables.
Storing it in db is also wrong cause you do not want anyone with an access to db to also have access to your payment provider.
Refer this for more info
https://12factor.net/config
getServerSideProps is the backend (to call APIs) in NextJS so it is secure to reference your environment variables here. Just ensure private keys don't appear in any client rendering. getServerSideProps are server rendered. I assume your blog searching pointed you in this direction -- but in case anyone else ends up here.
There is also this tool to confirm what code the client sees.
I have some problems still do not understand and I need help.
In some web application like Facebook, when I type a word to find my friends or places, apps..., a suggestion list appear for me. I can traverse and choose one of them.
So I want to ask something:
Best or good tool, language or something like that to do this? I think it's jQuery. More options for me?
Which is a list item in the suggestion list called?
Where did these things from? I means: how can I create or take them? From database directly?
The answers are:
You can use jQuery coupled with a server side language that retrieve the data
Usually it's called suggestion list. These function is Google is called Google suggest
The data are retrieved from the database
I am needing to integrate Sage Pay on our website to accept online payments.
I have downloaded and tested the PHP kit provided by Sage and have run a few successful tests, however, I don't know where to start when it comes to integrating this with Cake PHP.
If anybody has some initial pointers or ideas, or even links (multiple, varied Google searches yielded nothing) that would be great ...
Many thanks,
Dave
Hi there,thanks for the reply, and apologies for the delayed replying myself. I have it all working now, except my final issue as that I need to parse the final response returned from SagePay. The demo has the following code in the final step that gets posted to my site (to an action), The code they have is as follows:
...
$strVPSSignature=$_REQUEST["VPSSignature"];
$strStatusDetail=$_REQUEST["StatusDetail"];
...
Obviously this won't work due to Cake's routing. How do you suggest I parse these value>
Thanks again.
Dave
Haven't used Sagepay but a few pointers anyway:
Third party PHP classes should be loaded as vendors, so that is what I would do with their PHP kit.
This guy thinks SagePay's kit is a mess so you might find using his classes is easier to grok.
Although some might say payments belong in the business layer (your model), you might find it easier to initially perform payments from the controller layer. As such, I would start by creating a simple component with the inputs and outputs you need (methods/parameters/return values) and use it as a wrapper for the SagePay vendor of your choice. This will help keep your controller actions skinny. You can refactor later to your taste once you get things working.
If the solution is to override init() and del() from db.Model / db.Expando / db.PolyModel, then do I need to call the superclass functions?
Would be great to see some example code in the answers or on links. Thanks a lot.
I've written a couple of blog posts on this subject: One on high level pre- and post- put hooks, and one on the low level hook support. One of these is probably what you're looking for.
I think that the best way to accomplish what you want to do is to use datastore API hooks.
Using that approach will allow you to avoid messing directly with the classes and superclasses. That could get complex and messy and buggy very quickly.
If this is the java implementation, you can implement javax.jdo.listener.StoreCallback on your domain model and then define method jdoPreStore(). This method will automatically be called each time you persist to the datastore.
When I was setting up an account with gmail few years back (probably this is still a case, haven't check) I've noticed that system doesn't allow to register common terms, nouns as username, it seemed that it used a sort of dictionary for screening. I would like to implement similar feature in my app, anyone have idea how to tackle this? App is written in PHP but understand I'll have to hook it up with online service.
Thanks
Wordpress MU has such feature too, you fill a list of possible usernames that you want to avoid and they become unavailable for users. You can check its source to get their approach...
Sinan.
Well the API will vary from service to service so I'd suggest you find one, look at their developer docs and then if you have a question ask it here.