Hello, Could any one help me fix this I don't know what's the problem
I added the digital signing in the attached file unfortunately we still receive the invalid signature error
Any suggestion or help will be appreciated - this module is used in Opencart platform
this is the line code – line 193 in the attached file and main integration file attached.
$data['fawry_signature'] = hash('sha256', $data['fawry_merchant_code'] . $data['fawry_merchantRefNumber'] . $data['fawry_customer']['customerProfileId'] . $product['productSKU'] . $product['quantity'] . $product['price'] . $payment_fawry_security_key);
Line 226
$signature = hash('sha256', $this->config->get('payment_fawry_merchant_code') . $data['fawry_merchant_code'] . $data['fawry_merchantRefNumber'] . $data['fawry_customer']['customerProfileId'] . $product['productSKU'] . $product['quantity'] . $product['price'] . $this->config->get('payment_fawry_security_key'));
and this is the request from the API documentation
If you’re using the old plugin
You need to send signature element in the request by hashing the below concatenating string in Sha256
Case of 1 charge item:
merchantCode + merchantrefNumber + customerProfileId(if exist) + productSKU + quantity + price(in two decimal format) + secure Key
Case of multiple charge items should be sorted first by sku:
merchantCode + merchantrefNumber + customerProfileId(if exist) + productSKU(of item-1) + quantity(of item-1) + price(of item-1 in two decimal format) + productSKU(of item-2) + quantity(of item-2) + price(of item-2 in two decimal format) + secure Key
fawry.txt