clawsonm/cakephp-propay

CakePHP 2.x wrapper plugin for ProPay API services. Uses auto generated WSDL.

0.2.0 2014-03-25 16:06 UTC

This package is not auto-updated.

Last update: 2024-04-13 13:14:56 UTC


README

Build Status Coverage Status Total Downloads Latest Stable Version

cakephp-propay

wrapper for propay SOAP service in cakephp. Source WSDL is located at http://protectpay.propay.com/API/SPS.svc?wsdl. However to test your implementation you must use their test service located at http://protectpaytest.propay.com/api/sps.svc?wsdl

Installation

Using Composer

Add the plugin to your project's composer.json - something like this:

  {
    "require": {
      "clawsonm/cakephp-propay": "dev-master"
    }
  }

Because this plugin has the type cakephp-plugin set in its own composer.json, Composer will install it inside your /Plugins directory, rather than in the usual vendors file. It is recommended that you add /Plugins/ProPay to your .gitignore file. (Why? read this.)

You must also generate the SOAP Client classes

path/to/plugin/setup.sh

or specify a path as the first parameter e.g.

Plugin/ProPay/setup.sh Plugin/ProPay/generated

NOTE: setup.sh uses the production WSDL URL. It assumes that you will specify the correct URL, test or production in your code, see below.

Non Composer

You must generate the SOAP client with wsdl2phpgenerator from http://github.com/wsdl2phpgenerator/wsdl2phpgenerator. If you use Composer it should already be downloaded by composer. Place the generated code in generated/.

e.g. Run:

./vender/bin/wsdl2php -i http://protectpay.propay.com/API/SPS.svc?wsdl -o generated/

./vender/bin/wsdl2php -i http://protectpaytest.propay.com/api/sps.svc?wsdl -o generated/

Configuration

Please bootstrap the plugin when you load it. e.g.:

CakePlugin::load('ProPay', array('bootstrap' => true));

ProPay.wsdlUrl

This is the WSDL URL used by the SOAP client to determine the correct URL to communicate with.

ProPay.generatedLib

This allows you to set a path to the generated SOAP client files for the autoloader (which is loaded in the plugin's bootstrap) to use.

ProPay.authenticationToken

This is your ProPay Authentication Token. If you use ProPay you know what this is. Please do not include this in your repo. Put it in a separate file that you exclude from your repo.

ProPay.billerAccountId

This is your ProPay BillerAccountId. If you use ProPay you know what this is. Please do not include this in your repo. Put it in a separate file that you exclude from your repo.

License

MIT License

See LICENSE file.