Member
Posts: 228
Registered: ‎03-19-2018
Kudos: 52
Solutions: 7

Re: Custom payment gateway integration using a plugin.

Gateways have API's that will allow for this. I'm currently working on gateway integrations for UCRM that will also handle subscriptions. I was waiting for UCRM linked subscriptions to be improved but since that hasn't happened I'll be implementing it on a per gateway basis. Square and Stripe is mostly finished and I will be implementing GoCardless as well.

 

These implementations can be used as standalone gateway improvements to UCRM or along with my signup plugin that will create and collect the tokens.

 

The concern with PCI compliance as far as the plugin goes is very minimal. Since the integration will use the gateways SDK nothing will touch UCRM in regards to CC info, it's stored on the gateway and can be refferences with just a token in UCRM that can be used along with a secure api connection and gateway secret key.

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Veteran Member
Posts: 4,739
Registered: ‎05-19-2009
Kudos: 901
Solutions: 27

Re: Custom payment gateway integration using a plugin.

Calling @UBNT-Petr and @UBNT-Ondra

 

their shift starts at 3 am EST I think so give time for a reply..

Emerging Member
Posts: 44
Registered: ‎03-25-2016
Kudos: 3

Re: Custom payment gateway integration using a plugin.

We are building in Payeezy, NMI, and Cardpoint. The issue with PCI compliance is UCRM tells the gateway to run the card. So although it doesn't store any card data it still automatically authorizes auto pays.
Regular Member
Posts: 338
Registered: ‎11-18-2009
Kudos: 97
Solutions: 10

Re: Custom payment gateway integration using a plugin.

@900mhzdude / @starwire,

 

You are both correct, in the sense that all the payment gateways I have used (or developed for) in the past few years do not store any customer data on the integration side.  This is a requirement of PCI compliancy!  All information is stored on their end and most even allow for additional requests to use an ID refering to a "customer" from a previous transaction, to prevent the need to resend the sensitive data.

 

If a plugin is storing card numbers and/or sensitive information locally, then it is doing it VERY wrong!!!

 

Member
Posts: 228
Registered: ‎03-19-2018
Kudos: 52
Solutions: 7

Re: Custom payment gateway integration using a plugin.

@UBNT-PetrIs there a way to get a plugin's ID? Currently there isn't an easy way to dynamically link to the plugin details page or more importantly the plugin client zone page since the url is different depending on what ID Ucrm gave the plugin.

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Member
Posts: 228
Registered: ‎03-19-2018
Kudos: 52
Solutions: 7

Re: Custom payment gateway integration using a plugin.

This would be a helpful feature for payment integrations as well: https://community.ubnt.com/t5/UCRM-Feature-Requests/Hidden-Custom-Attributes/idi-p/2622407

 

A gateway customer ID doesn't need to be seen by the client but it's helpful to store as a custom attribute.

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Regular Member
Posts: 338
Registered: ‎11-18-2009
Kudos: 97
Solutions: 10

Re: Custom payment gateway integration using a plugin.

Here is how I accomplish that very thing from my plugins:

 

The environment variables are already setup by UCRM and the PDO (pdo-pgsql) extensions are already enabled, so no additional setup should be required.

 

The following code is a variant of my UCRM Database class, so I have not tested it as is, but it should be close!  Also, and obviously, catch the necessary Exceptions and handle your errors CoolgleamA

 

$host = "localhost";
$port = 5432;
$dbname = getenv("POSTGRES_DB");
$user = getenv("POSTGRES_USER");
$pass = getenv("POSTGRES_PASSWORD");

$pdo = new \PDO("pgsql:host=$host;port=$port;dbname=$dbname", $user, $pass, [
    // Setting some default options.
    \PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
]);

$db = $pdo::connect();

// You can modify the SELECT here to gather any information you like, but we only need the ID. $sql = "SELECT id FROM plugin WHERE name = [plugin_name]"; $rows = $db->query($sql)->fetchAll(); $pluginId = $rows[0]["id"]; // ...

Don't forget to replace [plugin_name] with the name of the plugin you are looking for and then you can then use $pluginId as you see fit!

 

NOTE: This particular code is read-only from the database, so it cannot cause any issues, but I always recommend testign on a development UCRM server first.

 

Let me know if you need anything further and hope it helps!

Member
Posts: 228
Registered: ‎03-19-2018
Kudos: 52
Solutions: 7

Re: Custom payment gateway integration using a plugin.

Thank you for the alternative @rspaeth but it would be better to be publically exposed via the ucrm.json file for simplicity.

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Highlighted
Ubiquiti Employee
Posts: 1,475
Registered: ‎03-21-2016
Kudos: 242
Solutions: 160

Re: Custom payment gateway integration using a plugin.

Hello @Brandon-W , there is currently no easy way to get plugin's ID, we'll add to it to generated ucrm.json.

Ubiquiti Employee
Posts: 1,475
Registered: ‎03-21-2016
Kudos: 242
Solutions: 160

Re: Custom payment gateway integration using a plugin.

@Brandon-W @rspaeth The plugin ID is available in ucrm.json in just released UCRM 2.15.0-beta6.

Member
Posts: 228
Registered: ‎03-19-2018
Kudos: 52
Solutions: 7

Re: Custom payment gateway integration using a plugin.

Excellent, thank you @UBNT-Ondra 

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Member
Posts: 228
Registered: ‎03-19-2018
Kudos: 52
Solutions: 7

Re: Custom payment gateway integration using a plugin.

Is there any status update on having access to the "Pay Online" via the API?

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
New Member
Posts: 20
Registered: ‎02-08-2019

Re: Custom payment gateway integration using a plugin.

I find this thread a little confusing. I was expecting a How-to for setting up custom payment gateways, but I'm not seeing that.

 

None of the built-in online payment services are available in my country (not even Paypal), so I need to create my own. Unfortunately, it's out of my skillset to do so, so I'll need to hire a developer to do this.

 

We'll be needing payment gateways with 'Ali Pay', 'WeChat Pay' and a couple of others, but before we go hiring a developer to do this, I need to be 100% sure that what we need is totally do-able.

 

Hopefully this will be a simple yes/no question.
If I hire a developer to follow the 'Developer documentation' on github to create a custom payment gateway plugin for Ali Pay, and using the uCRM api docs to update the client's account details, as well as create a 'New menu item in the client zone' for online payments, will this work?  Is it as simple as that?

Emerging Member
Posts: 44
Registered: ‎03-25-2016
Kudos: 3

Re: Custom payment gateway integration using a plugin.

Yes it will. If your looking for a experienced UCRM developer PM @rspaeth he is a very busy guy so also check out @Brandon-W we use plugins from both guys there good at what they do.

New Member
Posts: 20
Registered: ‎02-08-2019

Re: Custom payment gateway integration using a plugin.

Thanks for the quick reply @HFarnes .  Will take it up my management and keep those 2 members in mind when the time comes.

 

 

*Darn!  Why do I keep getting logged out this morning. "Authentication Failed.Authentication Ticket Mismatched, failed authentication."

New Member
Posts: 2
Registered: Thursday

Re: Custom payment gateway integration using a plugin.

We need custom payment plugin. We want to develop paid plugin. How can i make?