Sagepay Simulator Vendor Error - opayo

I'm trying to perform transaction using Sagepay Server API. I've properly setup by simulator vendor account and also added the IP address. Still im getting the following error
Sage Pay returned an MALFORMED status. The POST was Malformed because "Simulator cannot find your vendor name. Ensure you have have supplied a Vendor field with your Vendor name assigned to it."
Here is my POST request data
[VPSProtocol] => 2.23
[TxType] => PAYMENT
[Currency] => GBP
[Vendor] => curiouslabx
[NotificationUrl] => http://localhost:8080/numberplate/sagepay_notification
[Description] => Purchase of number plate AU59STG
[AllowGiftAid] => 0
[ApplyAVSCV2] => 0
[Apply3DSecure] => 0
[Profile] => NORMAL
[AccountType] => E
[Amount] => 700.00
[success_url] => http://localhost:8080/numberplate/payment/payment_status/success/
[failure_url] => http://localhost:8080/numberplate/payment/payment_status/failure/
[BillingFirstnames] => test
[BillingSurname] => test
[BillingAddress1] => test
[BillingAddress2] => test
[BillingCity] => testtest
[BillingPostCode] => test
[BillingCountry] => test
[BillingState] => test
[BillingPhone] => test
[DeliveryFirstnames] => test
[DeliverySurname] => test
[DeliveryAddress1] => test
[DeliveryAddress2] => test
[DeliveryCity] => testtest
[DeliveryPostCode] => test
[DeliveryCountry] => test
[DeliveryState] => test
[DeliveryPhone] => test
[VendorTxCode] => 14-04-30-20-10-53-572086512
I'm using sagepay server library for codeigniter https://github.com/ollierattue/codeigniter-sagepay-server/

If you are using the Simulator, things are in a bad way anyway. It does not support protocol 3.00 - your will need to integrate at this level, or your integration will cease to function on 31/7/15

Related

Laravel - Wrong password generate 'Error' in logs

When a user puts in a bad password, I see it as the level of ERROR in the logs which does not seem like it deserves to be that critical. I alarm off errors so I can understand health of the system. Is there anyway to turn this down to a warning or info...
`production.ERROR: array (
'error' => 'The given data was invalid.',
'errorLine' => 71,
'errorFile' =>
/var/www/html/dashboard/vendor/laravel/framework/src/Illuminate/Validation/ValidationException.php',
'error_catch_scope' => 'report',
'error_catch_file' => '/var/www/html/dashboard/app/Exceptions/Handler.php',
)
I am using laravel 5.7

Laravel localization file format error: array() versus [] format

I am struggling a bit with localization in Laravel 5.3 (with php 7). The default localizaiton file format in Laravel 5.3 is using brackets, as in this example:
return [
'footer.contact.email' => 'Email:',
]
That's what I have been using in my app and it's working fine. But now I am trying to work with some packages to help with translations, for example:
https://github.com/potsky/laravel-localization-helpers
https://github.com/barryvdh/laravel-translation-manager
But both of those generate localization files in the "old" laravel 4.x array format. For example
return array(
'footer' => array(
'contact' => array(
'email' => 'Email:',
),
),
);
As I understand it I should have no issue with this localization file format in my laravel 5.3 app, however it's always throwing an exception:
[2016-12-02 13:26:01] local.ERROR: ErrorException: htmlspecialchars() expects parameter 1 to be string, array given in C:\100_source_code\consulting_platform_laravel\maingig\vendor\laravel\framework\src\Illuminate\Support\helpers.php:519
Stack trace:
#0 C:\100_source_code\consulting_platform_laravel\maingig\vendor\sentry\sentry\lib\Raven\Breadcrumbs\ErrorHandler.php(36): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'htmlspecialchar...', 'C:\\100_source_c...', 519, Array)
I really cant understand why this format is not working with my app. I bet it is something trivial that I am missing, but any help would be very welcome!
Thanks,
Christian
After a few extra hours of stepping through the code I found the source of the problem.
For example, I got these in my original lang file:
'footer.subscribe' => 'SUBSCRIBE TO OUR NEWSLETTER',
'footer.subscribe.intro' => 'Be the first to know about our latest news...',
'footer.subscribe.privacy' => 'Privacy Policy',
'footer.subscribe.tos' => 'Terms of Service',
'footer.subscribe.tac' => 'Terms and Conditions',
As I tried to use both of the packages mentioned in my original question they produced the following output:
'footer' =>
array (
'subscribe' =>
array (
'intro' => 'TODO: intro',
'privacy' => 'TODO: privacy',
'tos' => 'TODO: tos',
'tac' => 'TODO: tac',
),
),
As you can see the generated file dropped the value for the text footer.subscribe and only kept the child element, intro, privacy, tos and tas in this case. Therefore a request for trans('footer.subscribe') returns an array and not the text.
Now that I know this I will change the format of my original translation file!
c.

puppet add user to local windows group

For a couple of weeks I'm struggling with puppet. I do have it pretty much working but i keep getting issues to add a user to the built-in group "Administrators".
I do can add an user to that group, but removing is not possible. This is an local user, without a domain-controler
Here is my manifest:
#Adding user to administrators-group;
class developers {
user {'user_erik':
name => 'Erik.dev',
ensure => present,
comment => 'Developer',
groups => ['Administrators],
membership => inclusive,
password => 'blaat123',
}
}
#removing (not working);
class developers {
user {'user_erik':
name => 'Erik.dev',
ensure => present,
comment => 'Developer',
groups => [],
membership => inclusive,
password => 'blaat123',
}
}
# another way to set this up;
class developers {
user {'user_erik':
name => 'Eric.dev',
ensure => present,
comment => 'Developer',
groups => [],
membership => inclusive,
password => 'blaat123',
}
group{'admin':
name => 'Administrators',
ensure => present,
members => ['Erik.dev'],
}
}
getting error:
Error:
OLE error code:8007055B in Active Directory
" Cannot perform this operation on built-in accounts "
In UNIX I have no problems, but windows is almost killing me and I cannot find my answer on the internet.
Hope someone has it working.
thanks
Dave
I'm going to assume this is a copy pasta error:
user {'user_erik':
name => 'Erik.dev',
ensure => present,
comment => 'Developer',
groups => ['Administrators],
membership => inclusive,
password => 'blaat123',
}
note groups is missing an apostrophe. groups => ['Administrators] should be groups => ['Administrators']
Let's take a look at the remove:
user {'user_erik':
name => 'Erik.dev',
ensure => present,
comment => 'Developer',
groups => [],
membership => inclusive,
password => 'blaat123',
}
I think you are running into a derivative of PUP-3653, where you are trying to remove a user from all groups. I would instead put the user in at least one group (perhaps 'Users'?).
Group Membership
With groups, you must specify the complete list of members. Group auth_membership => minimum is ignored in less than Puppet 4.0.0. See PUP-2628 and PUP-3719 for details.
The error
Error: OLE error code:8007055B in Active Directory " Cannot perform
this operation on built-in accounts "
is most likely related to:
group{'admin':
name => 'Administrators',
ensure => present,
members => ['Erik.dev'],
}
Right now you would need to specify the complete list and you can't remove built-in accounts from the Administrators group. Because this isn't the complete list, Puppet is attempting to remove LocalSystem from the list and running into issues, generating the error you see above.
In Puppet 4.x you can specify it like the above or you can specify it like this:
group{'admin':
name => 'Administrators',
ensure => present,
members => ['Erik.dev'],
auth_membership => false,
}

LazReport doesn't work on second machine

I have two computers - Ubuntu 12.04 + Lazarus. Let's call them A and B.
I develop a program on A. It works fine.
I run the same program on B using Lazarus and it works fine.
Then I make a compiled program (binary) on A and try it on B. Now the problem starts.
Everything works fine except that none of the reports (LazReport) appear. There's no error. Just no response. The program continues without a crash but just no response. How is this possible?
Clues:
On machine A and B, I installed the software (Lazarus) as the default admin user.
On machine B, I have another user account but this is a standard user.
On machine B, I installed LazReport component on Lazarus using the standard user account. So I suspect a permissions issue.
Then I removed the LazReport component on Lazarus from machine B and reinstalled it a second time. But this time I ran it as admin like this gksu -u ADMIN -w startlazarus but still no change.
Please advice how I may solve this problem.
My restriction:
I must be able to do this using the standard account and not ADMIN. Is this even possible?
Thanks!
EDIT: here's the output of ldd:
linux-gate.so.1 => (0xb76f3000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76c3000)
libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb758f000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0 (0xb756d000)
libgtk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0 (0xb7105000)
libgdk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0 (0xb7056000)
libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb7007000)
libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb6f0e000)
libgthread-2.0.so.0 => /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 (0xb6f0a000)
libgmodule-2.0.so.0 => /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0 (0xb6f05000)
libpango-1.0.so.0 => /usr/lib/i386-linux-gnu/libpango-1.0.so.0 (0xb6ebb000)
libcairo.so.2 => /usr/lib/i386-linux-gnu/libcairo.so.2 (0xb6df0000)
libatk-1.0.so.0 => /usr/lib/i386-linux-gnu/libatk-1.0.so.0 (0xb6dd0000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb6dca000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6c20000)
/lib/ld-linux.so.2 (0xb76f4000)
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb6bff000)
libgio-2.0.so.0 => /usr/lib/i386-linux-gnu/libgio-2.0.so.0 (0xb6aa8000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb6a7c000)
libpangocairo-1.0.so.0 => /usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0 (0xb6a6e000)
libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb6a68000)
libpangoft2-1.0.so.0 => /usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0 (0xb6a3c000)
libfontconfig.so.1 => /usr/lib/i386-linux-gnu/libfontconfig.so.1 (0xb6a08000)
libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb69f6000)
libXrender.so.1 => /usr/lib/i386-linux-gnu/libXrender.so.1 (0xb69eb000)
libXinerama.so.1 => /usr/lib/i386-linux-gnu/libXinerama.so.1 (0xb69e7000)
libXi.so.6 => /usr/lib/i386-linux-gnu/libXi.so.6 (0xb69d7000)
libXrandr.so.2 => /usr/lib/i386-linux-gnu/libXrandr.so.2 (0xb69ce000)
libXcursor.so.1 => /usr/lib/i386-linux-gnu/libXcursor.so.1 (0xb69c3000)
libXcomposite.so.1 => /usr/lib/i386-linux-gnu/libXcomposite.so.1 (0xb69be000)
libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb69ba000)
libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb69b3000)
libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb6977000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb696e000)
libpixman-1.so.0 => /usr/lib/i386-linux-gnu/libpixman-1.so.0 (0xb68d5000)
libfreetype.so.6 => /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xb683b000)
libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb6811000)
libxcb-shm.so.0 => /usr/lib/i386-linux-gnu/libxcb-shm.so.0 (0xb680d000)
libxcb-render.so.0 => /usr/lib/i386-linux-gnu/libxcb-render.so.0 (0xb6803000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb67ec000)
libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb67e8000)
libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb67e1000)
libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0xb67c2000)
libresolv.so.2 => /lib/i386-linux-gnu/libresolv.so.2 (0xb67aa000)
libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb677f000)
They appear IDENTICAL on machines A and B except that the hex number within brackets is different. Apart from that, it's the same line to line.
EDIT: More info - new findings...
I opened a terminal. Then ran Nautilus. Then I run my binary and when trying the report, I got this error in the terminal:
[WARNING] SetAlphaBlend called without handle for
frProgressForm(TfrProgressForm)
I have no clue but I believe this is the bug. I have no form like the one mentioned either.
Apparently, as I discovered much later, the reports didn't work outside of the development folder although the rest of the application did.
The solution was to simply copy the report files (.lrf) and put it into the destination folder that contained the binary.

meaning of failure_reset_period option in win32-service gem for Ruby

Creating new service with win32-service, what's the meaning of the failure_reset_period ?
I'll appreciate some words on other options too (failure_reboot_message, failure_command, failure_actions, failure_delay) and examples.
Thank you in advance.
an example of use:
Service.new(
:service_name => SERVICE_NAME,
:display_name => SERVICE_DISPLAYNAME,
:start_type => Service::AUTO_START,
:error_control => Service::ERROR_NORMAL,
:service_type => Service::WIN32_OWN_PROCESS,
:description => 'This service does blah blah..',
:binary_path_name => path,
:failure_reset_period => 86400, # period (in seconds) with no failures after which the failure count should be reset to 0
:failure_actions => [ Service::ACTION_RESTART ], # action to take
:failure_delay => 60000 # delay before action in milliseconds
)
failure_reset_period resets to 0 the failure count on the service after specified time, what is useful since you can configure different actions for the first, second and other failures of the service.
meaning of those options is described here, for failure_reset_period:
the number of days that must pass before the service fail count is
reset
What if I need to set second and third failure options having different failure_delay?

Resources