Payment Plugin for Payfort

1 2 3 4 >
Posted: February 22, 2016 at 4:08 PM Quote #162610
Hello,

I want to implement a payment plugin for my website.

I've gone through the docs and need help in implementing the Payfort API ( https://testfort.payfort.com/api/)

Another resource I found is the git repository (https://github.com/payfort/start.net)

I think it is much similar to the Paypal Standard plugin.

Please help me to start with the development.

Regards.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: February 22, 2016 at 10:17 PM Quote #162631
I have not seen full documentation. By far I am seeing I think you can start Authorize.net plugin and customize according to your requirement. :)
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Do you want to version upgrade, custom development, create plugins or need any help? You are welcome!

  Best Regards,
     Anik
Email: [email protected]
skype: shantunusaha
http://nop-station.com/
Posted: February 23, 2016 at 12:53 AM Quote #162635
Hi,

Another resource is the nuget package for the Payfort API client:

http://www.nuget.org/packages/Start.Net/

It's basically the source code that you can see on Github.

Just take into consideration that the client has Newtonson.Json 7.0.1 as a dependency, so it will work fine for nopCommerce 3.70, but for earlier versions of nopCommerce you will have to either:

                 1) branch the source code from github, and build the client with the correct version of NewtonsonJson
                 or 2) add the Newtonson.Json 7.0.1 DLL in the plugin's folder - however, I think the safest is to go with 1, if you target older versions of nopCommerce.


Also, an article which I gound usefull when I started developing payment plugins:

http://docs.nopcommerce.com/display/nc/How+to+code+my+own+payment+method

Best regards
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nop-payments.com provides free payment plugins for nopCommerce.
Posted: February 23, 2016 at 8:57 AM Quote #162686
anik1991 wrote:
I have not seen full documentation. By far I am seeing I think you can start Authorize.net plugin and customize according to your requirement. :)


Thanks Anik for your response.

I'll try.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: February 23, 2016 at 9:25 AM Quote #162690
nop-payments.com wrote:
Hi,

Another resource is the nuget package for the Payfort API client:

http://www.nuget.org/packages/Start.Net/

It's basically the source code that you can see on Github.

Just take into consideration that the client has Newtonson.Json 7.0.1 as a dependency, so it will work fine for nopCommerce 3.70, but for earlier versions of nopCommerce you will have to either:

                 1) branch the source code from github, and build the client with the correct version of NewtonsonJson
                 or 2) add the Newtonson.Json 7.0.1 DLL in the plugin's folder - however, I think the safest is to go with 1, if you target older versions of nopCommerce.


Also, an article which I gound usefull when I started developing payment plugins:

http://docs.nopcommerce.com/display/nc/How+to+code+my+own+payment+method

Best regards


Thanks for your response.
Your WorldPay Plugin is similar to Payfort. I'll try using that.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: March 20, 2016 at 9:00 PM Quote #164334
Hello!

Thanks for the support you've provided me so far.

I'm almost there to complete the payment plugin.

I just want to know more about the below code snippet:

merchantId = _PayuPaymentSettings.MerchantId.ToString();
orderId = form["txnid"];
Amount = form["amount"];
productinfo = form["productinfo"];
firstname = form["firstname"];
email = form["email"];
hash = form["hash"];
status = form["status"];

I want to get the merchant ID from the database. I know how to retrieve the information which is stored in database. But I don't know how to get the data which is not yet stored in the database like the order ID which will be stored in database after the successful placement of order.

I've checked many payment plugins and almost every payment plugin is using the syntax mentioned below:

variable = form["variablenname"];

Like in the above mentioned code snippet order = form["txnid"];

I want to know what is this "txnid" where is this defined in the source code or the form...???
Similarly "amount", "productinfo","firstname","email","hash" and "status" where is this defined..???

Please enlighten me on this.

Regards.

Pramil Gawande
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: March 20, 2016 at 9:26 PM Quote #164335
Hello,

In the ProcessPayment method you cannot get the orderId, because at that point the order is not yet inserted in the database.

However, you can use the property OrderGuid, which is set at that point.

The orderId is available in the PostPrococessPament method, but you only use that if you are implementing a redirect-type plugin, which I don't think you are.

Good luck
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nop-payments.com provides free payment plugins for nopCommerce.
Posted: March 20, 2016 at 10:58 PM Quote #164336
[email protected] wrote:
Hello!

Thanks for the support you've provided me so far.

I'm almost there to complete the payment plugin.

I just want to know more about the below code snippet:

merchantId = _PayuPaymentSettings.MerchantId.ToString();
orderId = form["txnid"];
Amount = form["amount"];
productinfo = form["productinfo"];
firstname = form["firstname"];
email = form["email"];
hash = form["hash"];
status = form["status"];

I want to get the merchant ID from the database. I know how to retrieve the information which is stored in database. But I don't know how to get the data which is not yet stored in the database like the order ID which will be stored in database after the successful placement of order.

I've checked many payment plugins and almost every payment plugin is using the syntax mentioned below:

variable = form["variablenname"];

Like in the above mentioned code snippet order = form["txnid"];

I want to know what is this "txnid" where is this defined in the source code or the form...???
Similarly "amount", "productinfo","firstname","email","hash" and "status" where is this defined..???

Please enlighten me on this.

Regards.

Pramil Gawande


Also, the form variables come from the UI (PaymentInfo.cshtml)... The string you use for the "variablename" is the Name attribute from the INPUT element
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
nop-payments.com provides free payment plugins for nopCommerce.
Posted: March 21, 2016 at 1:17 AM Quote #164342
nop-payments.com wrote:
Hello,

In the ProcessPayment method you cannot get the orderId, because at that point the order is not yet inserted in the database.

However, you can use the property OrderGuid, which is set at that point.

The orderId is available in the PostPrococessPament method, but you only use that if you are implementing a redirect-type plugin, which I don't think you are.

Good luck


Sorry I forgot to mention that I'm creating a Redirect type plugin.

I'm referencing the CC Avenue plugin https://www.nopcommerce.com/p/962/ccavenue-payment-module.aspx

They're using the params in the controller.

Can you please check and enlighten me..???

Regards.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: March 21, 2016 at 3:04 AM Quote #164346
nop-payments.com wrote:
Hello,

In the ProcessPayment method you cannot get the orderId, because at that point the order is not yet inserted in the database.

However, you can use the property OrderGuid, which is set at that point.

The orderId is available in the PostPrococessPament method, but you only use that if you are implementing a redirect-type plugin, which I don't think you are.

Good luck


I've checked the PostProcessPayment method in the payment processor file of the plugin and it actually solved most of my problem. Thanks for the hint.

In the controller the Return Method has the following code snippet:

NameValueCollection Params = new NameValueCollection();
            string[] segments = encResponse.Split('&');
            foreach (string seg in segments)
            {
                string[] parts = seg.Split('=');
                if (parts.Length > 0)
                {
                    string Key = parts[0].Trim();
                    string Value = parts[1].Trim();
                    Params.Add(Key, Value);
                }
            }

            for (int i = 0; i < Params.Count; i++)
            {
                Response.Write(Params.Keys[i] + " = " + Params[i] + "<br>");
            }

            /*
            merchantId = form["Merchant_Id"];
            orderId = form["Order_Id"];
            Amount = form["Amount"];
            AuthDesc = form["AuthDesc"];
            checksum = form["Checksum"];
            */

            merchantId = Params["Merchant_Id"];
            orderId = Params["Order_Id"];
            Amount = Params["Amount"];
            AuthDesc = Params["order_status"];


Is this code collecting the response after successful/unsuccessful capture of the transaction..??? Because the order_status parameter is in the response header of the API.

Regards.
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
1 2 3 4 >
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.