Skip to content

Dixeat/payplug-sharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

This is no longer supported.

.NET library for the PayPlug API

No Maintenance Intended ci-status nuget

This is the documentation of PayPlug's .NET library. It is designed to help developers to use PayPlug as payment solution in a simple, yet robust way.

You can create a PayPlug account at https://www.payplug.com.

Prerequisites

PayPlug's library relies on Newtonsoft.Json for JSON serialization. You also need .NET 4.5 or newer to use the library.

Documentation

Please see https://www.payplug.com/docs/api for latest documentation.

Installation

Option 1 - Strongly preferred) via NuGet:

PM> Install-Package Payplug

or simply add Payplug as a dependency of your project.

Option 2) download as a tarball:

  • Download the most recent stable tarball from the download page
  • Extract the tarball somewhere outside your project.
  • chdir into the folder you've just extracted.
  • Run the following commands:
$ rake compile

To get started, add the following piece of code to the header of your source:

using Payplug;

If everything run without error, congratulations. You installed PayPlug .NET library! You're ready to create your first payment.

Usage

Here's how simple it is to create a payment request:

var paymentData = new Dictionary<string, dynamic>
{
    { "amount", 3300 },
    { "currency", "EUR" },
    { "customer", new Dictionary<string, object>
        {
            { "email", "[email protected]" },
            { "first_name", "John" },
            { "last_name", "Watson" }
        }
    },
    { "hosted_payment", new Dictionary<string, object>
        {
            { "return_url", "https://example.net/success?id=42710" },
            { "cancel_url", "https://example.net/cancel?id=42710" }
        }
    },
    { "notification_url", "https://example.net/notifications?id=42710" },
    { "metadata", new Dictionary<string, object>
        {
            { "customer_id", "42710" }
        }
    },
    { "save_card", false },
    { "force_3ds", true }
};
var payment = Payment.Create(paymentData);

Go further:

Tests:

To run the tests, run the following command:

$ rake test

About

[DEPRECATED] PayPlug .Net Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.6%
  • Ruby 0.4%