question

devdoug avatar image
devdoug asked devdoug commented

Developing a Clover Plug-In for NopCommerce

This is my first time programming with the Clover API. We have a client that uses currently uses Clover and would like to integrate it with their website. They have a new site being created using NopCommerce (a c#/.net based eCommerce platform). I'll need to code a plug-in for NopCommerce to interact with Clover. If I've read documentation correctly, I believe I'll need to do the following:

During the initial use (loading the plugin):
Store the mId value, in the plug-ins settings..
Then have user click a button in admin panel to request for clover auth code.
When the code is returned, the application stores it in SQL server for future purchases.
When a customer makes s purchase:
The payment processing function will request API token.
Send POST request to clover with new order object.
Encrypt Credit Card information.
Send POST request to pay passing order and encrypted credit card to API.
If successful, store auth code in application and allow purchase.
If not, display payment failure notice.
With that being said, I have a few questions: Is this possible with the Clover API? I've seen that the application needs to be published in the Clover App Market to interact with the API. Would I need to publish this (and if so, I would guess publishing the plug-in)?

Once the application is authorized (has an auth code), does it need to request this for each purchase or only on the first use?

PaymentsAPI Token
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Lee Tickett avatar image
Lee Tickett answered devdoug commented
Hi @devdoug, that is a fairly accurate summary.
You can most certainly use the API in the way you describe.
An application in the app market can be either; native clover android app, web app or both. So in your instance you would be building a web app (or plugin). And will need to point to the URL something like https://mysite.nopcommerce.com/myplugin/aut
You do need to publish the (web) app.
Once authorized the api token should be valid for 1 year (hence storing it in SQL and retrieving it each time you need to interact with the api) would be fine.
My company do provide Clover development support if you need anything further feel free to reach out (we are also a c#/.net house so may be able to save you some time).
Good luck!
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

devdoug avatar image devdoug commented ·

Thank you, this helps! Will be working on this next week...

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community