I'm developing my own payment plugin on NopCommerce, my payment plugin requires additional info from the shop owner which I implemented on the config page, I want to prevent the owner to enable the plugin until he enters the required info correctly.
the button "is enabled" on the edit pop up can be changed unconditionally, is there a way to override the method "EditPopup" on the "PluginController" ? so I can make sure the plugin is not enabled until the config info is entered correctly.
enter image description here
Related
Currently I am developing Symfony application where I have multiple login form. For the login form I created the firewall and also created custom authenticator. New created custom authenticator added into the services.yaml file as well.
Authenticator working perfectly when added to the main firewall but it is not working with the oauth_login firewall.
New authenticator file is manually created.
When ever I try to login with oauth_login form, I am not able to login and also OLoginFormAuthenticator is not called.
Edit:
Following changes worked for me
A few approaches and ideas:
Rename custom_authenticator
Try to name the property custom_authenticators:
(with an trailing s)
See How to Write a Custom Authenticator for more information.
Check entry_point target
Also your entry_point could be wrong!
Does your Authenticator implements AuthenticationEntryPointInterface? You maybe want a separate class for this.
See The Entry Point for more information.
Show all possible configurations of security.yaml
Type this in your terminal to see all possible configurations of security.yaml
php bin/console config:dump-reference security
When my app first starts up, it displays a dialog asking the user to respond by clicking either "Don't Allow" or "OK" if they would allow the app to use the microphone.
Problem is, when the unit tests are first started this same dialog appears, which stops the execution of the tests. If the unit tests are being run by Xcode Server, there is no way to manually intervene and click a button.
Is there a way to automate the dismissal of this dialog? Doesn't matter which button is clicked for the unit tests.
I've tried putting the following code in the XCTestCase setUp() method:
[self addUIInterruptionMonitorWithDescription:#"Interruption Monitor" handler:^{BOOL(XCUIElement * element) {
XCUIElement *button = [[element buttons] elementAtIndex:0];
if (button) {
[button tap];
}
}];
but the handler is never called.
I don't even need the app to care about the microphone for the unit tests, if there's a way to never display the dialog in the first place.
Use shell command xcrun simctl privacy before executing the tests (e.g. before xcodebuild ... or as a preparation step in target's settings)
Here its info
Grant, revoke, or reset privacy and permissions
Usage: simctl privacy <device> <action> <service> [<bundle identifier>]
action
The action to take:
grant - Grant access without prompting. Requires bundle identifier.
revoke - Revoke access, denying all use of the service. Requires bundle identifier.
reset - Reset access, prompting on next use. Bundle identifier optional.
Some permission changes will terminate the application if running.
service
The service:
all - Apply the action to all services.
calendar - Allow access to calendar.
contacts-limited - Allow access to basic contact info.
contacts - Allow access to full contact details.
location - Allow access to location services when app is in use.
location-always - Allow access to location services at all times.
photos-add - Allow adding photos to the photo library.
photos - Allow full access to the photo library.
media-library - Allow access to the media library.
microphone - Allow access to audio input.
motion - Allow access to motion and fitness data.
reminders - Allow access to reminders.
siri - Allow use of the app with Siri.
bundle identifier
The bundle identifier of the target application.
Examples:
reset all permissions: privacy <device> reset all
grant test host photo permissions: privacy <device> grant photos com.example.app.test-host
Warning:
Normally applications must have valid Info.plist usage description keys and follow the API guidelines to request access to services. Using this command to bypass those requirements can mask bugs.
The interruption monitors need to return a boolean value - the idea is that the test runner will execute all the interruption handlers that have been added to the interruption handler stack when an interruption is detected, until one of those handlers returns true.
https://developer.apple.com/documentation/xctest/xctestcase/handling_ui_interruptions
https://developer.apple.com/videos/play/wwdc2020/10220/
I have to Configure accept.js in Authorize.net Payment Gateway in my 3dcart store. I have Login Id, Transaction Key, And Public key as well. Do I need To just check- uncheck for enabling this accept.js? Or I need to add the code or this script to the checkout page and call javascript file? They give me Learn more link (http://developer.authorize.net/api/reference/features/acceptjs.html). And How to test it when it's configured well?
Same way I have just added Login Id and Transaction key & checked the check box of Enable Customer Information Manager (CIM) and Its working fine. As I tested it.
see screenshot: (https://www.screencast.com/t/etPeqTiBJf)
I'm very new to liferay and am creating a hook on the login.events.pre event. My users will be signing in to the website by using their phone number, so I have to do some validations on the status of their phone line before letting liferay create a session for the user. I've already created the portlet and am able to execute some java code before letting liferay take care of the login validation, but I'm not sure how to stop the whole process if my validation fails. In other words, if I find out that the users phone line is suspended, I don't want liferay to allow them to sign in, even if the right login info has been provided by the user. Is it possible to do this in the login.events.pre event in liferay?
In this case you can invalidate the Session and redirect it to some customized error page in your hook.
Below piece of code might be helpful.
//Below code to get the current session
HttpSession session = null;
session=request.getSession(false);
//Below code to invalidate the session and to redirect to your customized error page
session.invalidate();
response.sendRedirect("/errorPage.html");
Our requirement is to have email id as the username for the login. We used the blogger post found at this link. We built the business logic in the customauthenticator class file, and just deployed the BE authentication piece. We used the dropins folder as suggested and modified the authenitcators.xml file in the conf/advanced directory.
We tried with both disabled=true and disabled=false, and lower and higher priorities. There was simply no change. It didn't appear that the jar file was being picked up. Is there any other configuration that we are missing in order to get the custom authentication activated? Any pointers will be helpful.
You do not have to write a custom authenticator for your requirement.
If you enable JDBCUserStoreManager in user-mgt.xml and make the following property to true, then email id will be used as username.
Property name="IsEmailUserName"
Thanks,
Hasini.