RequestManualPayment.php
RequestManualPayment.php
<?php
require_once dirname(__FILE__) . "/SoftLayer/SoapClient.class.php";
$username = 'set me';
$apiKey = 'set me';
$amount = 50.55;
$cardAccountNumber = "4111111111111111";
$cardExpirationMonth = "10";
$cardExpirationYear = "2017";
$cardType = "001";
$creditCardVerificationNumber = "1111";
$currencyShortName = "USD";
$paymentType = "cc";
$billingAddressLine1 = "Test";
$billingAddressLine2 = "";
$billingCity = "Cbba";
$billingCountryCode = "US";
$billingEmail = "noreply@softlayer.com";
$billingNameCompany = "TestCompany";
$billingNameFirst = "Jhon";
$billingNameLast = "Thoms";
$billingPhoneVoice = "2342342";
$billingPostalCode = "44559";
$billingState = "TX";
$request = new stdClass();
$request -> amount = $amount;
$request -> billingAddressLine1 = $billingAddressLine1;
$request -> billingCity = $billingCity;
$request -> billingCountryCode = $billingCountryCode;
$request -> billingEmail = $billingEmail;
$request -> billingNameCompany = $billingNameCompany;
$request -> billingNameFirst = $billingNameFirst;
$request -> billingNameLast = $billingNameLast;
$request -> billingPhoneVoice = $billingPhoneVoice;
$request -> billingPostalCode = $billingPostalCode;
$request -> billingState = $billingState;
$request -> cardAccountNumber = $cardAccountNumber;
$request -> cardExpirationMonth = $cardExpirationMonth;
$request -> cardExpirationYear = $cardExpirationYear;
$request -> cardType = $cardType;
$request -> creditCardVerificationNumber = $creditCardVerificationNumber;
$request -> currencyShortName = $currencyShortName;
$request -> paymentType = $paymentType;
$request -> billingPostalCode = $billingPostalCode;
$client = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $username, $apiKey);
try {
$receipt = $client -> requestManualPayment($request);
print_r($receipt);
} catch(Exception $e) {
echo "Unable to request manual payment: " . $e -> getMessage();
}