Convert C# function to php function

In Progress Posted 6 years ago Paid on delivery
In Progress Paid on delivery

I need this C# code converted to php:

public string GetRequestChecksum(string secretKey, string merchantID, string transactionType, long amount, string currency, string merchantReference, string userID)

{

var checksumString = [login to view URL]("{0}|{1}|{2}|{3}|{4}|{5}", secretKey, merchantID, transactionType, amount, currency, merchantReference);

SHA256Managed sha = new SHA256Managed();

//[login to view URL] = [login to view URL]([login to view URL]([login to view URL](checksumString)).Select(h => [login to view URL]("X2")).Aggregate((i, j) => i + j), checksum, [login to view URL]).ToString();

return [login to view URL]([login to view URL](checksumString)).Select(h => [login to view URL]("X2")).Aggregate((i, j) => i + j);

}

Must produce same result as C# when running in my php plug-in.

Sample data for above values is here below:

SecretKey: DB3EEEFA-0324-4130-B259-7F43508FBB06

MerchantReference: ESC01UAT1512751543

MerchantID: E33F4561-23EA-431F-A0F6-DD0D62D06B90

TransactionType: Payment

Amount: 259900

Currency: ZAR

Checksum: BC031D95BF292C65F56B628CD2B7812A2C79A8F6448D2B7A78A3B90E6252F842

To verify that code has been generated correctly here is C#:

[login to view URL] = [login to view URL]([login to view URL]([login to view URL](checksumString)).Select(h => [login to view URL]("X2")).Aggregate((i, j) => i + j), checksum, [login to view URL]).ToString();

C# Programming PHP

Project ID: #15834207

About the project

6 proposals Remote project Active 6 years ago

6 freelancers are bidding on average $21 for this job

WebXcellance

Convert C# function to php function Relevant Skills and Experience Respected Sir, We have 7+ year exp in php and wordpress. We have expertise in content management system in wordpress. Proposed Milestones $30 USD More

$30 USD in 1 day
(171 Reviews)
7.3
alidiep

Can be less money than me Relevant Skills and Experience C# PHP Proposed Milestones $15 USD - PHP

$15 USD in 1 day
(16 Reviews)
4.5
SNMCoders

Just doing this project for positive reviews. I am a professional php developer. Relevant Skills and Experience Laravel PHP C# Proposed Milestones $15 USD - At end of project

$15 USD in 1 day
(0 Reviews)
0.0
NashGetch

A proposal has not yet been provided

$25 USD in 2 days
(0 Reviews)
0.0
premkumarsselvam

I have 3+ years of experience in PHP,C# Relevant Skills and Experience PHP,MVC,ASP.Net Proposed Milestones $15 USD - Project End

$15 USD in 1 day
(0 Reviews)
0.0