activemerchant auth.net login error - authorize.net

I cannot get our auth.net account to work on a new staging server.
The same code, and credentials work find on the current production server, and on my local machine.
The activemerchant config looks like this:
ActiveMerchant::Billing::Base.mode = :production #(Rails.env.production? ? :production : :test)
ActiveMerchant::Billing::CreditCard.require_verification_value = false
I have checked every where i can think of for some config that would be changing staging vs. development vs. production and can find nothing!
I have put logging in to confirm that I am passing the correct login / password to activemerchant.

well this was stupid, apparently another developer when copying the credentials somehow changed a single inner character (from an 8 to a 6) so it was not easily noticable.
I am just posting this answer because I found a great tool that is not very well documented in activemerchant...
add these two lines to an initializer, and you will get a complete log of the low level transactions going on...
ActiveMerchant::Billing::PaypalGateway.wiredump_device = File.new(File.join([Rails.root, "log", "paypal.log"]), "a")
ActiveMerchant::Billing::PaypalGateway.wiredump_device.sync = true
You can substitute PaypalGateway with AuthorizeNetCimGateway (or probably whatever gateway you are using)

Related

Adding user to group chrome-remote-desktop - Failed to access group. Is the user a member?

I created an instance with Debian 9 and was following the instructions on Google's site here. I have done this before successfully. All was going fine, but now when I do this part:
DISPLAY= /opt/google/chrome-remote-desktop/start-host \
--code="4/xxxxxxxxxxxxxxxxxxxxxxxx" \
--redirect-url="https://remotedesktop.google.com/_/oauthredirect" \
--name=
I get the error
Adding user newuser_gmail_com to group chrome-remote-desktop
ERROR:Failed to access chrome-remote-desktop group. Is the user a
member?
Can anyone help me out here? I notice that when I did this previously, the username create was not newuser_gmail_com, but rather simply newuser. Any suggestions you have would be much appreciated. Many thanks!
I found the answer, but this raises a possible bug for the Google Cloud team. The bug occurs if I add enable-oslogin = TRUE as a metadata. This causes the chrome-remote-desktop to fail.
When a user is added to a group (chrome-remote-desktop in this case), the change is not reflected in existing sessions until the user logs out and back in. To work around this limitation, Chrome Remote Desktop attempts to use sg to access the new group from the existing session. It looks like this isn't working for some reason on this system (apparently OS Login related?), so starting the host fails.
It should be sufficient to log out and back in. Once logged back in, very that the output of groups contains chrome-remote-desktop, then try running the headless setup flow again. (Make sure you generate a new command, as the --code argument is one-time-use only.)

Play! and AWS - provider chain is not respected

This likely going to be very simple. I have a Play! app that needs to talk to AWS and i'm trying to get any secrets out of code, even in dev mode.
i have the following code in a function (minus the case class):
case class AwsCredentials(token: String, accessId: String, secretKey: String)
val client = AWSSecurityTokenServiceClientBuilder.defaultClient()
val token = client.getSessionToken
client.shutdown()
val cred = AmazonS3ClientBuilder.standard()
.withRegion(Regions.US_EAST_1).getCredentials.getCredentials
AwsCredentials(token.getCredentials.getSessionToken,
cred.getAWSAccessKeyId,
cred.getAWSSecretKey)
the cred.getAwsAccessKeyId and cred.getAWSSecretKey always fall down to the magic keys, not the ones either from the environment variables that can be set or the user.dir/.aws/credentials or from /home/play/.aws/ directly as the service does run as play.
Locally with Play! running via sbt, this works just fine and uses my local keys, but as soon as I deploy it and start with an init.d script it no longer does. I have confirmed its in the environment variables and we use other environment variables, that work just fine.
Ultimately this is a AWS issue, but since i can get it to work locally with ammonite with the play user, there must be something amiss in Play.
Thanks!
Sorry for wasting anyones time that chose to read and ponder this issue, as the underlying issue, i'm nearly positive of is that, I need to provide the accessKey to fineuploader, so that is on the page and in role mode i need a token which needs to be passed as a header as soon as i do this, i'm not signing the request with the privateKey that matches fineuploader's accessKey
If i figure out, or want to invest the time to modify the JS code, i'll post back.

Migrate ColdFusion scheduled tasks using neo-cron.xml

We currently have two ColdFusion 10 dedicated servers which we are migrating to a single VPS server. We have many scheduled tasks on each. I have taken each of the neo-cron.xml files and copied the var XML elements, from within the struct type='coldfusion.server.ConfigMap' XML element, and pasted them within that element in the neo-cron.xml file on the new server. Afterward I restarted the ColdFusion service, log into cf admin, and the tasks all show as expected.
My problem is, when I try to update any of the tasks I get the following error when saving:
An error occured scheduling the task. Unable to store Job :
'SERVERSCHEDULETASK#$%^DEFAULT.job_MAKE CATALOGS (SITE CONTROL)',
because one already exists with this identification
Also, when I try to delete a task it tells me a task with that name does not exist. So it seems to me that the task information must also be stored elsewhere. So there when I try to update a task, the record doesn't exist in the secondary location so it tries to add it new to the neo-cron.xml file, which causes an error because it already exists. And when trying to delete, it doesn't exist in the secondary location so it says a task with that name does not exist. That is just a guess though.
Any ideas how I can get this to work without manually re-creating dozens of tasks? From what I've read this should work, but I need to be able to edit the tasks.
Thank you.
After a lot of hair-pulling I was able to figure out the problem. It all boiled down to having parentheses in the scheduled task names. This was causing both the "Unable to store Job : 'SERVERSCHEDULETASK#$%^DEFAULT.job_MAKE CATALOGS (SITE CONTROL)', because one already exists with this identification" error and also causing me to be unable to delete jobs. I believe it has something to do with encoding the parentheses because the actual neo-cron.xml name attribute of the var element encodes the name like so:
serverscheduletask#$%^default#$%^MAKE CATALOGS (SITE CONTROL)
Note that this anomaly did not exist on ColdFusion 10, Update 10, but does exist on Update 13. I'm not sure which update broke it, but there you go.
You will have to copy the neo-cron.xml from C:\ColdFusion10\\lib of one server to another. After that restart the server to make the changes effective. Login to the CF Admin and check the functionality.
This should work.
Note:- Please take a backup of the existing neo-cron.xml, before making the changes.

Lotus Notes throws NotesException: Database open failed (%1)

I am running a web service from an instance of Salesforce to our client's Lotus Notes server. I am able to get hard-coded content to return, so I feel certain that the connection itself is working as intended.
However, as noted in the subject, I am running into a NotesException. This is being thrown on the last line of the code below (db and path are simply parameters I pass into the function, I am able to view records from the nsf they correspond to):
s = WebServiceBase.getCurrentSession();
Database data = s.getDatabase(db, path);
data.open();
If I try not opening the database, I get an exception that says I need to open the database. We had been developing this web service for a while without ever opening the database or knowing that this was something to concern ourselves with. Obviously something changed, but as my office is full of Salesforce devs and not LN devs, we don't know what.
Any help in tracking down the root cause of this issue would be greatly appreciated.
Edit:
Comments want to know what I meant by hardcoded content. The function returns a 2d String array, so it would be something like:
result[0][0] = "Hello World";
return result;
The Problem is that the db ist not found. So try to change the path from the db.
if your db is in a folder on the server give the path for the folder in java.
Your path variable must have the right format.

Codeception - HTML report generation seems slow?

I am using Codeception to run three acceptance tests which basically are as follows:-
Check the email address 'admin#admin.com' exists
Create a new user account
Login to the website
Obviously this requires the database so I have added 'Db' to the list of modules in the acceptance.suite.yml, however the generation of the report takes sometime, is this normal or do I have something wrong with my setup?
Below is the report (and time taken for each according to the html file it is generating)
check admin#admin.com account exists (AdminCept.php) (0.01s)
create new user account (CreateUserCept.php) (19.1s)
log in to the website (LoginCept.php) (21.72s)
Approx 40 seconds in total (although the command line states 1:02 - I guess as it replaces the mock database dump.sql back into the database as well)
Can anybody shed any light on the matter?
Not really an answer but closing this off - simply put the report generation takes time.