Created
August 17, 2016 16:58
-
-
Save kdjomeda/e580b480b4ef3aa822024b5585b7c6b0 to your computer and use it in GitHub Desktop.
Modified index.php that only passes , amount, order id and comment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once 'Integrator.class.php'; | |
$paylive="https://app.slydepay.com.gh/payLIVE/detailsnew.aspx?pay_token="; | |
$ns="http://www.i-walletlive.com/payLIVE"; | |
$wsdl="https://app.slydepay.com.gh/webservices/paymentservice.asmx?wsdl"; | |
$settings = parse_ini_file("config.ini"); | |
$api_version=$settings["slydepay.api_version"]; | |
$merchant_email=$settings["slydepay.merchant_email"]; | |
$merchant_secret_key=$settings["slydepay.merchant_key"]; | |
$service_type="C2B"; | |
$integration_mode=true; | |
$slyde = new SlydepayConnector($ns, $wsdl, $api_version, $merchant_email, $merchant_secret_key, $service_type, $integration_mode); | |
$order_id= GUID(); | |
$comment1=""; | |
$comment2=""; | |
$order_items = array(); | |
$theactualtotal = 3000.45; | |
$shipping_cost=0; | |
$tax_amount=0; | |
$order_items[0] = $slyde->buildOrderItem("001", "aggregated items", $theactualtotal, 1, $theactualtotal); | |
$response = $slyde->ProcessPaymentOrder($order_id, $theactualtotal, $shipping_cost, $tax_amount, $theactualtotal, $comment1, $comment2, $order_items); | |
// var_dump($response->ProcessPaymentOrderResult); | |
$redirect = $paylive.$response->ProcessPaymentOrderResult; | |
header("Location: $redirect"); | |
function GUID() | |
{ | |
if (function_exists('com_create_guid') === true) | |
{ | |
return trim(com_create_guid(), '{}'); | |
} | |
return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment