adobo Creative Awards adobo creative awards

Sample Pay

save as name.wsdl
// Then change the first parameter to the location of file. e.g. say that the file is located
// at /var/www/html/dragonpay_merchant_service.wsdl
//
//$wsdl = new SoapClient(‘http://www.adobomagazine.com/dragonpay_merchant_service.wsdl’, array(
$wsdl = new SoapClient($url . ‘?wsdl’, array(
‘location’ => $url,
‘trace’ => 1,
));

$merchantTxnId = ‘ADOBO-‘ . time();
//$merchantTxnId = ‘4123’;

$params = array(
‘merchantId’ => ‘ADOBO’,
‘password’ => ‘P@g9SDx5’,
‘merchantTxnId’ => $merchantTxnId,
‘amount’ => ‘5.00’,
‘ccy’ => ‘PHP’,
‘description’ => ‘description’,
’email’ => ‘[email protected]’,
);

$params_billing = array(
‘merchantId’ => ‘ADOBO’,
‘merchantTxnId’ => $merchantTxnId,
‘firstName’ => ‘Jeriel’,
‘lastName’ => ‘Lopez’,
‘address1’ => ‘3/F Builders Centre 170 Salcedo Street’,
‘address2’ => ‘Legaspi Village’,
‘city’ => ‘Makati City’,
‘state’ => ‘Metro Manila’,
‘country’ => ‘PH’,
‘zipCode’ => ‘1229’,
‘telNo’ => ‘6556820’,
’email’ => ‘[email protected]’,
);

$result_billing = $wsdl->SendBillingInfo($params_billing)->SendBillingInfoResult;

if($result_billing == 0){
$tokenid = $wsdl->GetTxnToken($params)->GetTxnTokenResult;

header(“Location: https://gw.dragonpay.ph/Pay.aspx?tokenid=” . $tokenid);
//dsm($tokeid);
}else{

}

Partner with adobo Magazine
Back to top button