Should Nash Link work locally? Simple woocommerce store coming soon!

Hey, first time posting but frequent visitor and Nash staker since ICO :slight_smile:

Two questions:

  1. Should the sandbox mode work locally when using Nash link? (using MAMP)

  2. Poll below sizing is in regard to a hoodie

What size are you?
  • X-Small
  • Small
  • Medium
  • Large
  • X-Large

0 voters

@con322 please correct me if I misunderstood your comment, the Nash Link sandbox feature uses a blockchain testnet and do real blockchain transactions - that is what the button “trigger payment” does, it sends a transaction at the correct value to the invoice.

You can use the plugins and sandbox with local development, all you need is a connection to Nash itself.

1 Like

Thanks. Think we’re on the same page.

I have the plugin installed and added my sandbox credentials however when I click pay with “Pay with Nash Link” it takes me too the error page I’ve set (not sure on how to debug there’s no debug log appearing or anything).

Here’s what I have in my wp-config.php

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

Does my Nash/Nash Link account(setup a different account to separate things from my personal one) need to be verified before i can use the sandbox or just for production?

I installed a local PrestaShop site when Nash Link soft-launched: everything went well until I clicked on “Pay with Nash Link” while on staging, having generated and saved a sandbox API key. At this point I got an error like you. Didn’t think much of it at the time and attributed it to the fact that I was testing in a local environment. I did not dig further.

@canesin is there a list of currencies Nash Link supports?

Currently I get the following error

[{"error":true,"message":"Invalid currency","success":null,"status_code":400}]

The currency parameter sent to the createinvoice function is GBP.

Is this the best place to be putting these technical queries or would Github be better?

The only currency we currently support for price is EUR, I am unaware if there is an API for querying the list of supported currencies, I have asked our growth engineer to come to this thread for support - but in general is better to seek support at support.nash.io .

Thanks I’ll await communication from the growth engineer.

In the meantime am going to see if i can make use of woocommerce to get the exchange rate, convert the GBP amount to EUR when using Nash Link and then pass as the param currency.

Not sure if you can get exchange rate on the fly with woocommerce will have a look, does Nash have an api that can be used? Otherwise I’ll see if there’s some library that can be used.

Hi con322,

The only thing that will not work locally for our ecommerce plugins is the webhook callback. When our servers try to reach your informed notificationURL to inform about any invoice status update he wont be able to connect to your local address on most internet providers.
So you can test all the the features locally but not the webhook.
For that you should have a woocommerce instance running with a public IP address without access restrictions on your 80 or 443 ports.

2 Likes

To avoid expose our API internal erros to end user(the client shopping on your store), we only show up with the error page you setup.
To debug, you can take a look on orders log.
Go to admin dashboard and them click on Woocomerce -> Orders
By selecting any order, you will see a log status at the right side of dashboard, along with our internal error code and message to help you get full error information.

1 Like

@con322 ,

Nash link API doesn’t provide a query for supported currencies yet. Like @canesin mention, for now we only support EUR. More currency support to come soon…

Maybe you can try an online free or paid API to query fiat to fiat rates.

1 Like

@canesin @romulo came up with a simple solution which can be found here, basically if the currency is not EUR it will convert the amount from the currency it comes through in to EUR set the price to the EUR price and currency to EUR and then return the new set of params which are used in creating the Nash Link invoice.

Separate to this i want to make my woocommerce store multi currency but will do that at a later date.

Added a gist to hopefully help others, it could also be useful adding filters in places like mentioned in the gist for developers to hook into.

Thanks for all your hard work on Nash :slight_smile:

2 Likes