Giter VIP home page Giter VIP logo

splitit-web-php-sdk's Introduction

splitit-web-php-sdk

Splitit's Web API

Packagist

Table of Contents

Installation & Usage

Requirements

This library requires PHP ^7.0

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/konfig-dev/splitit-web-php-sdk.git"
    }
  ],
  "require": {
    "konfig/splitit-web-php-sdk": "3.0.0"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/splitit-web-php-sdk/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$splitit = new \Splitit\Client(
    getenv("SPLITIT_CLIENT_ID"),
    getenv("SPLITIT_CLIENT_SECRET")
);

$result = $splitit->installmentPlan->checkEligibility(
    "X-Splitit-IdempotencyKey_example", 
    "", 
    [
        "total_amount" => 3.14,
        "number_of_installments" => 1,
        "purchase_method" => "InStore",
    ], 
    [
        "card_brand" => "Mastercard",
        "card_type" => "Credit",
    ], 
    [
    ], 
    "string_example"
);

Reference

splitit.installmentPlan.checkEligibility

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->checkEligibility(
    "X-Splitit-IdempotencyKey_example", 
    "", 
    [
        "total_amount" => 3.14,
        "number_of_installments" => 1,
        "purchase_method" => "InStore",
    ], 
    [
        "card_brand" => "Mastercard",
        "card_type" => "Credit",
    ], 
    [
    ], 
    "string_example"
);

โš™๏ธ Parameters

x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

PlanData: PlanData
CardDetails: CardData
BillingAddress: AddressData
ShopperIdentifier: string

๐Ÿ”„ Return

InstallmentsEligibilityResponse

๐ŸŒ Endpoint

/api/installmentplans/check-eligibility POST

๐Ÿ”™ Back to Table of Contents


splitit.installmentPlan.get

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->get(
    "installmentPlanNumber_example", 
    "X-Splitit-IdempotencyKey_example", 
    ""
);

โš™๏ธ Parameters

installment_plan_number: string
x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

๐Ÿ”„ Return

InstallmentPlanGetResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber} GET

๐Ÿ”™ Back to Table of Contents


splitit.installmentPlan.post

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->post(
    True, 
    "X-Splitit-IdempotencyKey_example", 
    "", 
    True, 
    [
    ], 
    [
        "total_amount" => 3.14,
        "purchase_method" => "InStore",
    ], 
    [
    ], 
    [
    ], 
    [
    ], 
    [
    ], 
    [
    ], 
    "None", 
    "string_example"
);

โš™๏ธ Parameters

AutoCapture: bool
x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

Attempt3dSecure: bool
Shopper: ShopperData
PlanData: PlanDataModel
BillingAddress: AddressDataModel
UxSettings: UxSettingsModel
EventsEndpoints: EventsEndpointsModel
ProcessingData: ProcessingData
x_splitit_test_mode: string
splititclientinfo: string

๐Ÿ”„ Return

InitiatePlanResponse

๐ŸŒ Endpoint

/api/installmentplans/initiate POST

๐Ÿ”™ Back to Table of Contents


splitit.installmentPlan.post2

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->post2(
    True, 
    True, 
    "X-Splitit-IdempotencyKey_example", 
    "", 
    True, 
    [
    ], 
    [
        "total_amount" => 3.14,
        "purchase_method" => "InStore",
    ], 
    [
    ], 
    [
        "type" => "Card",
    ], 
    [
    ], 
    [
    ], 
    [
    ], 
    "None", 
    "string_example"
);

โš™๏ธ Parameters

AutoCapture: bool
TermsAndConditionsAccepted: bool
x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

Attempt3dSecure: bool
Shopper: ShopperData
PlanData: PlanDataModel
BillingAddress: AddressDataModel
PaymentMethod: PaymentMethodModel
ProcessingData: ProcessingData
EventsEndpoints: EventsEndpointsModel
x_splitit_test_mode: string
splititclientinfo: string

๐Ÿ”„ Return

InstallmentPlanCreateResponse

๐ŸŒ Endpoint

/api/installmentplans POST

๐Ÿ”™ Back to Table of Contents


splitit.installmentPlan.refund

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->refund(
    3.14, 
    "installmentPlanNumber_example", 
    "X-Splitit-IdempotencyKey_example", 
    "", 
    "FutureInstallmentsFirst", 
    "string_example"
);

โš™๏ธ Parameters

Amount: float
installment_plan_number: string
x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

RefundStrategy:
ReferenceId: string

๐Ÿ”„ Return

InstallmentPlanRefundResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber}/refund POST

๐Ÿ”™ Back to Table of Contents


splitit.installmentPlan.search

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->search(
    "X-Splitit-IdempotencyKey_example", 
    "", 
    "string_example", 
    "string_example", 
    [
        "key": "string_example",
    ]
);

โš™๏ธ Parameters

x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

installment_plan_number: string
ref_order_number: string
extended_params: array<string, string>

๐Ÿ”„ Return

InstallmentPlanSearchResponse

๐ŸŒ Endpoint

/api/installmentplans/search GET

๐Ÿ”™ Back to Table of Contents


splitit.installmentPlan.updateOrder

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->updateOrder(
    "installmentPlanNumber_example", 
    "X-Splitit-IdempotencyKey_example", 
    "", 
    "string_example", 
    "string_example", 
    True, 
    "Pending", 
    3.14
);

โš™๏ธ Parameters

installment_plan_number: string
x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

RefOrderNumber: string
TrackingNumber: string
Capture: bool
ShippingStatus:
NewAmount: float

๐Ÿ”„ Return

InstallmentPlanUpdateResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber}/updateorder PUT

๐Ÿ”™ Back to Table of Contents


splitit.installmentPlan.updateOrder2

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->updateOrder2(
    "X-Splitit-IdempotencyKey_example", 
    "", 
    "string_example", 
    "string_example", 
    True, 
    "Pending", 
    3.14, 
    [
    ]
);

โš™๏ธ Parameters

x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

RefOrderNumber: string
TrackingNumber: string
Capture: bool
ShippingStatus:
NewAmount: float
Identifier: IdentifierContract

๐Ÿ”„ Return

InstallmentPlanUpdateResponse

๐ŸŒ Endpoint

/api/installmentplans/updateorder PUT

๐Ÿ”™ Back to Table of Contents


splitit.installmentPlan.verifyAuthorization

๐Ÿ› ๏ธ Usage

$result = $splitit->installmentPlan->verifyAuthorization(
    "installmentPlanNumber_example", 
    "X-Splitit-IdempotencyKey_example", 
    ""
);

โš™๏ธ Parameters

installment_plan_number: string
x_splitit_idempotency_key: string
x_splitit_touch_point: string

TouchPoint

๐Ÿ”„ Return

VerifyAuthorizationResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber}/verifyauthorization GET

๐Ÿ”™ Back to Table of Contents


Author

This PHP package is automatically generated by Konfig

splitit-web-php-sdk's People

Contributors

dphuang2 avatar eddiechayes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.