Revolut Payment and nodeJS

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 anno tempo fa
Good day everyone,

I am developing the Revolut Payment option in nopcommerce, and I was wondering if there is a way to use nodeJS with nopcommerce, or not at all.
If so, is there any documentation on how to achieve this?

Best regards
1 anno tempo fa
Why do you need a "server side /  back-end JavaScript runtime environment"?
(If you create a Payment Provider plugin, then you should be able to call the 3rd party API.)
1 anno tempo fa
I am following the Payment Provider documentation

https://developer.revolut.com/docs/revolut-checkout-js/install-widget

This shows that besides the javascript code to be added in the payment options of nopcommerce, the widget needs a nodejs module.
1 anno tempo fa
If "you need to add RevolutCheckout to your checkout page in one of the following ways:", then I think this option is the way to go:
Adding the embed script to the checkout HTML page. This adds RevolutCheckout to the browser’s global window."
1 anno tempo fa
Perfect, I got that part solved.
Now when developing the plugin, I am trying to test it.
I try installing the "local plugin" but whenever it restarts, visual studio kills the process, and when I start it again, the plugin is still showing the option Install.

What am I doing wrong?
1 anno tempo fa
Yes, VS will restart.  But the plugin manager should update this section
  "PluginNamesToInstall": []
in your \Presentation\Nop.Web\App_Data\plugins.json file.
Then, on restart it will actually install the plugin.

Check to see if anything is in that section.
Also, check the System > Log to see if any errors.
1 anno tempo fa
I found this error in the System Log menu


System.FormatException: String '' was not recognized as a valid DateTime.
   at System.DateTimeParse.ParseExactMultiple(ReadOnlySpan`1 s, String[] formats, DateTimeFormatInfo dtfi, DateTimeStyles style)
   at System.DateTime.ParseExact(ReadOnlySpan`1 s, String[] formats, IFormatProvider provider, DateTimeStyles style)
   at Nop.Data.Migrations.NopMigrationAttribute..ctor(String dateTime, String description) in C:\Projects\nopCommerce_4.30\Libraries\Nop.Data\Migrations\NopMigrationAttribute.cs:line 29
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
   at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
   at FluentMigrator.Runner.Infrastructure.DefaultMigrationRunnerConventions.GetMigrationInfoForMigrationImpl(IMigration migration)
   at Nop.Data.Migrations.MigrationManager.<>c__DisplayClass10_0.<GetMigrations>b__1(IMigration m) in C:\Projects\nopCommerce_4.30\Libraries\Nop.Data\Migrations\MigrationManager.cs:line 154
   at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToArray()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.GetEnumerator()+MoveNext()
   at Nop.Data.Migrations.MigrationManager.ApplyUpMigrations(Assembly assembly, Boolean isUpdateProcess) in C:\Projects\nopCommerce_4.30\Libraries\Nop.Data\Migrations\MigrationManager.cs:line 180
   at Nop.Services.Plugins.PluginService.InsertPluginData(Type pluginType, Boolean isUpdateProcess) in C:\Projects\nopCommerce_4.30\Libraries\Nop.Services\Plugins\PluginService.cs:line 193
   at Nop.Services.Plugins.PluginService.InstallPlugins() in C:\Projects\nopCommerce_4.30\Libraries\Nop.Services\Plugins\PluginService.cs:line 466


Not really sure why, is there something wrong in the DB, or is it that I'm missing something in the code?
1 anno tempo fa
There is something wrong with your code.
Do you have a migration attribute e.g. something like
    [NopMigration("2020/03/25 12:00:00", "Widgets.FacebookPixel base schema")]

Is it a valid datetime ?
1 anno tempo fa
Yidna wrote:
There is something wrong with your code.
Do you have a migration attribute e.g. something like
    [NopMigration("2020/03/25 12:00:00", "Widgets.FacebookPixel base schema")]

Is it a valid datetime ?


Where would that be?
I am using nopCommerce-4.30 just downloaded code, MySql module 8.0.29, and then developing a plugin.
1 anno tempo fa
Found it!
Is a file called SchemaMigration.cs and it has information regards the plugin. How is this file generated?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.