Skip to content

Latest commit

 

History

History
122 lines (93 loc) · 4.23 KB

README.md

File metadata and controls

122 lines (93 loc) · 4.23 KB

ThePeer-dotnet

Usage

Installation

Install via .NET CLI

dotnet add package ThePeer --version 1.0.0

Install via Package Manager

Install-Package ThePeer --version 1.0.0

Add Namespace Directive

using ThePeerHQ;

###Initialize

var thePeer = new ThePeer("your-secret-key");
await thePeer.ChargeLink("lost-in-the-world", 5000, "Benz");

Available Methods

  • ValidateSignature
    • accepts:
      • request (object)
      • signature (string)
    • returns : boolean
var isValidated = ThePeer.ValidateSignature(payload, "somestringsignature");
  • GetSendReceipt (async)
    • accepts:
      • receiptId (string)
    • returns : object
var response = await thePeer.GetSendReceipt("receiptId");
  • ProcessSendReceipt (async)
    • accepts:
      • receiptId (string)
      • event (string)
    • returns : object
var response = await thePeer.ProcessSendReceipt("receiptId", false);
  • IndexUser (async)
    • accepts:
      • name (string)
      • email (string)
      • identifier (string)
    • returns : object
var response = await thePeer.IndexUser("john", "john@ex.com", "identifier");
  • UpdateUser (async)
    • accepts:
      • receiptId (string)
      • reference (string)
    • returns : object
var response = await thePeer.UpdateUser("receiptId", "reference");
  • DeleteUser (async)
    • accepts:
      • reference (string)
    • returns : bool
var response = await thePeer.DeleteUser("reference");
  • GetLink (async)
    • accepts:
      • linkId (string)
    • returns : object
var response = await thePeer.GetLink("linkId");
  • ChargeLink (async)
    • accepts:
      • linkId (string)
      • amount (integer)
    • returns : object
var response = await thePeer.ChargeLink("linkId", 5000);
  • AuthorizeDirectCharge (async)
    • accepts:
      • reference (string)
      • event (string)
    • returns : object
var response = await thePeer.AuthorizeDirectCharge("reference", false);

Extra

Refer to the documentation for more information.