2017 © Pedro Peláez
 

library solid-trust-pay-php

A starter package for interacting with the Solid Trust Pay API.

image

codifyllc/solid-trust-pay-php

A starter package for interacting with the Solid Trust Pay API.

  • Saturday, September 24, 2016
  • by lhoezee
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Solid Trust Pay

StpButton

This class is used to generate a payment button, (*1)

$stpButton = new StpButton();
$stpButton->setMerchantAccount('YourMerchantValue');
$stpButton->setItemId('YourMerchantValue');
$stpButton->setSciName('YourMerchantValue');
$stpButton->setLogo('YourMerchantValue');
$stpButton->setUser1('user1 value');
$stpButton->setUser2('user2 value');
$stpButton->setUser3('user3 value');
// setUser* (up to 10)

$stpButton->setReturnUrl('http://yourReturnUrl.com/thankyou');
$stpButton->setCancelUrl('http://yourReturnUrl.com/cancel');
$stpButton->setNotifyUrl('http://yourReturnUrl.com/yourCallbackScript.php');
$stpButton->setAmount('25.99');

// Enable Test Mode
$stpButton->setTestMode('On');

StpCallback

This class is used to fetch $_POST. This should be called from your notify_url value that you set in your StpButton class, (*2)

$stpCallback = new StpCallbck();

$status = $stpCallback->getStatus();
$user1 = $stpCallback->getUser1();
$user2 = $stpCallback->getUser2();

switch($status) {
    case 'COMPLETE':
        // This is successful!

        $stpTransId = $stpCallback->getTrId();
        break;

    default:
        // Something went wrong...
        break;
}

The Versions

24/09 2016

dev-master

9999999-dev

A starter package for interacting with the Solid Trust Pay API.

  Sources   Download

The Requires

  • php >=5.3.0

 

24/09 2016

1.0

1.0.0.0

A starter package for interacting with the Solid Trust Pay API.

  Sources   Download

The Requires

  • php >=5.3.0