2017 © Pedro Peláez
 

library miva-provision

Various classes, helpers, and wrappers for dealing with Miva Merchant Provisioning API

image

ghassani/miva-provision

Various classes, helpers, and wrappers for dealing with Miva Merchant Provisioning API

  • Monday, June 15, 2015
  • by ghassani
  • Repository
  • 4 Watchers
  • 1 Stars
  • 57 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Miva PHP Provision Tools

These are a set of libraries and wrappers for dealing with Miva Merchant Enterprise Provisioning., (*1)

Right now, only enterprise customers of Miva Merchant have access to use their provisioning API. This may or may not change in the future., (*2)

XML & SOAP Client

This wrapper makes it super simple to programatically send your Miva Merchant Provisioning XML File to your Miva Merchant Installation., (*3)

Usage Example:, (*4)

use Miva\Provisioning\Client;
use Miva\Provisioning\Request;

$client = new Client('https://www.mystorefront.com/mm5/', 'MYTOKENHERE');

$request = new Request();

$request->setContent('<Provision> ... </Provision>);

$response = $client->doRequest($request);

Provision XML Builder

This library allows you to programatically construct a valid Miva Merchant Provision XML File., (*5)

Usage Example:, (*6)

use Miva\Provisioning\Builder\Builder;
use Miva\Provisioning\Builder\Fragment\StoreCreate;
use Miva\Provisioning\Builder\Fragment\ProductAdd;

$storeCode = 'STORE_CODE';

$builder = new Builder($storeCode);

$storeCreate = new StoreCreate();

$builder->addFragmentToDomain($storeCreate);
// alternately:
// $builder->addFragment($storeCreate);

$productAdd = new ProductAdd();

$productAdd->setCode('some_code')
  ->setName('Product Name')
  ->setPrice(20.00)
  ->setCode(10.00)
  ->setWeight(1.00)
  ->setDescription('Product Description')
  ->setTaxable(true)
  ->setActive(true);

$builder->addFragmentToStore($productAdd, $storeCode)
// alternately:
// $builder->addFragment($productAdd, $storeCode);

$xml = $builder->toXml(); //completed XML Document

// you can then send it with the client

$client = new Client('https://www.mystorefront.com/mm5/', 'MYTOKENHERE');

$request = new Request($xml);

$response = $client->doRequest($request);

echo $response->getContent(); 

Installation

You can pull the source and use your own/existing class loader, or you can simply use composer., (*7)

Via Composer, (*8)

    "require": {
        "ghassani/miva-provision" : "dev-master"
    }

Via PHAR Package, (*9)

Eventually, (*10)

Misc

This is still a work in progress, (*11)

Enjoy! If you would like to contribute, feel free to send in pull requests., (*12)

The Versions

15/06 2015

dev-master

9999999-dev

Various classes, helpers, and wrappers for dealing with Miva Merchant Provisioning API

  Sources   Download

Apache 2.0

The Requires

 

by Gassan Idriss

26/12 2014

0.2.x-dev

0.2.9999999.9999999-dev

Various classes, helpers, and wrappers for dealing with Miva Merchant Provisioning API

  Sources   Download

Apache 2.0

The Requires

 

by Gassan Idriss