Skip to content

Commit

Permalink
Ok complete (#195)
Browse files Browse the repository at this point in the history
* PHP version update

* Card Blacklist services & tests

* iyziLink Ccreate Product service upgrade complete, FastLink with 404 error

* IyziLink FastLink create complete

* IyziLink Update Product Status Complete

* requestToStringQuery type update

* IyziLink / Search Merchant Products complete

* PHP version update

* Create C2C Submerchant complete

* Verify C2C Submerchant complete

* Create & Verify C2C Submerchant tests complete

* create function return type added

* Minor type fixes

* Amount Bsee Refund Services & sample complete

* Amount Base Refund tests complete

* PlusInstallment: Create Payment service complete

* PlusInstallment: Create Payment sample & tests complete

* Base model updates

* Mail address change

* getHttpHeadersV2 function params update

* reportingScrollTransaction type added

* Reporting: Scroll Transaction Reporting service complete

* Reporting: Scroll Transaction Reporting sample & tests complete

* Subscription List service partially complete with date format error.

* Subscription List sample & tests complete

* Uncommented lines

* Subscription: Delete Customer service complete

* Subscription: Delete Customer sample & tests complete

* Date filters format fix

* sms verification code encryption for verify endpoint complete

* payload uri re-structured for v2 headers

* signature verification function implemented

* CheckoutFormInitialize service updated to v2 headers

* Removed unused line

* Function updated to reflect params order variations

* Added signature verification sample codes

* BKM Initialize service updated with v2 headers along with signature verification sample

* CheckoutForm Retrieve service updated to v2 Headers

* BKM Retrieve service updated to v2 headers

* Payment Service Initialize 3D Payment updated to v2 headers

* Payment Service Create 3D Payment updated to v2 headers

* Payment Service Create Non3D Payment updated to v2 headers

* Payment Service Retrieve Payment Result updated to v2 headers

* Cleanup

* Provision Service Create Non3D Preauth updated to v2 headers along with a sample file

* Provision Service Initialize 3D Preatuh updated to v2 headers along with a sample file

* Provision Service Initialize CheckoutForm Preauth updated to v2 headers along with a sample file

* Provision Service Create PostAuth updated to v2 headers along with a sample file

* PWI Services Initialize updated to v2 headers

* Cleanup

* PWI Services Retrieve updated to v2 headers

* removed used token

* AUTHORIZATION_FALLBACK_HEADER added to v2 headers

* APM Service Initialize & Retrieve updated to v2 headers

* Updated Service in sample file

* Signature verification test codes added

* Signature field moved to Resource file

* paymentId field added into request and sample file

* sample file create_threads_preauth renamed to initialize_checkoutform_preauth

* Loyalty/Inquire service updated to v2 headers

* Marketplace Services updated to v2 headers

* Marketplace C2C Services updated to v2 headers

* Payment Services updated to v2 headers

* PlusInstallment Service updated to v2 headers

* Reporting Service updated to v2 headers

* Card Register Service updated to v2 headers

* Card BlackList Service updated to v2 headers

* Payment & iyziUp Services updated to v2 headers

* PaymentPreAuth Retrieve updated to v2 headers along with a signature verification test codes included sample file

* iyziUp Form Services updated to v2 headers

* installmentHtml Service updated to v2 headers

* Crossbooking Services updated to v2 headers

* Payment Services updated to v2 headers

* callbackUrl & webhook signature validation files added to samples folder

* Variable name fixes

* chore: Update IyziAuthV2Generator.php and AmountBaseRefund.php

* chore: Update .gitignore to exclude index.php file

* gitignore updated

* ReportingPaymentDetailRequest bug fix

* amount_base_refund uri bug fix

* getHttpHeadersIsV2 method added

* Remove test.php file

* ucs_init.php print_r fixed

* getHttpHeadersV2 to getHttpHeadersIsV2

* Refactor ThreedsPayment::retrieve method to use getHttpHeadersV2 for API request

* Refactor ThreedsPayment::retrieve method to use getHttpHeadersV2 for API request

* Update github_pull_request.yml

Signed-off-by: Erdem Demir <[email protected]>

* Update PHP version requirement to 7.4 and later

* Update github_pull_request.yml

Signed-off-by: Erdem Demir <[email protected]>

* Update PHPUnit version requirement to 5.4.*

* Update PHPUnit version requirement to ~9.6

* FileBase64Encoder rename FileBase64EncoderTest

* Refactor test classes to extend TestCase

* Ok fixes (#196)

* getHttpHeaders function added

* Function updated to allow nullable request

* Function updated to allow nullable request

* Fixes to pass tests in accordance with respective request class

* fixes failure "Iyzipay\Tests\Request\CreateBasicBkmInitializeRequestTest::test_should_get_json_object"

* fixes failure "6) Iyzipay\Tests\Request\CreateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "7) Iyzipay\Tests\Request\CreateCheckoutFormInitializeRequestTest::test_should_get_json_string"

* fixes failure "8) Iyzipay\Tests\Request\CreateIyziupFormInitializeRequestTest::test_should_get_json_string"

* fixes failure "9) Iyzipay\Tests\Request\CreateIyziupFormInitializeRequestWithInitialConsumerTest::test_should_get_json_string"

* fixes failure "10) Iyzipay\Tests\Request\Subscription\SubscriptionUpgradeRequestTest::test_should_get_json_string"

* fixes failure "11) Iyzipay\Tests\Request\UpdateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "5) Iyzipay\Tests\Request\CreateBasicPaymentRequestTest::test_should_get_json_string"

* fixes failure "6) Iyzipay\Tests\Request\CreateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "1) Iyzipay\Tests\DefaultHttpClientTest::test_should_check_if_options_not_empty"

---------

Co-authored-by: Osman Keser <[email protected]>

* Ok fixes (#197)

* getHttpHeaders function added

* Function updated to allow nullable request

* Function updated to allow nullable request

* Fixes to pass tests in accordance with respective request class

* fixes failure "Iyzipay\Tests\Request\CreateBasicBkmInitializeRequestTest::test_should_get_json_object"

* fixes failure "6) Iyzipay\Tests\Request\CreateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "7) Iyzipay\Tests\Request\CreateCheckoutFormInitializeRequestTest::test_should_get_json_string"

* fixes failure "8) Iyzipay\Tests\Request\CreateIyziupFormInitializeRequestTest::test_should_get_json_string"

* fixes failure "9) Iyzipay\Tests\Request\CreateIyziupFormInitializeRequestWithInitialConsumerTest::test_should_get_json_string"

* fixes failure "10) Iyzipay\Tests\Request\Subscription\SubscriptionUpgradeRequestTest::test_should_get_json_string"

* fixes failure "11) Iyzipay\Tests\Request\UpdateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "5) Iyzipay\Tests\Request\CreateBasicPaymentRequestTest::test_should_get_json_string"

* fixes failure "6) Iyzipay\Tests\Request\CreateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "1) Iyzipay\Tests\DefaultHttpClientTest::test_should_check_if_options_not_empty"

* fixes error 1 "Call to undefined method..."

* fixes error 2 "file_get_contents/.... Failed to open stream"

---------

Co-authored-by: Osman Keser <[email protected]>

* Ok fixes (#198)

* getHttpHeaders function added

* Function updated to allow nullable request

* Function updated to allow nullable request

* Fixes to pass tests in accordance with respective request class

* fixes failure "Iyzipay\Tests\Request\CreateBasicBkmInitializeRequestTest::test_should_get_json_object"

* fixes failure "6) Iyzipay\Tests\Request\CreateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "7) Iyzipay\Tests\Request\CreateCheckoutFormInitializeRequestTest::test_should_get_json_string"

* fixes failure "8) Iyzipay\Tests\Request\CreateIyziupFormInitializeRequestTest::test_should_get_json_string"

* fixes failure "9) Iyzipay\Tests\Request\CreateIyziupFormInitializeRequestWithInitialConsumerTest::test_should_get_json_string"

* fixes failure "10) Iyzipay\Tests\Request\Subscription\SubscriptionUpgradeRequestTest::test_should_get_json_string"

* fixes failure "11) Iyzipay\Tests\Request\UpdateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "5) Iyzipay\Tests\Request\CreateBasicPaymentRequestTest::test_should_get_json_string"

* fixes failure "6) Iyzipay\Tests\Request\CreateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "1) Iyzipay\Tests\DefaultHttpClientTest::test_should_check_if_options_not_empty"

* fixes error 1 "Call to undefined method..."

* fixes error 2 "file_get_contents/.... Failed to open stream"

* Put, Patch fix

---------

Co-authored-by: Osman Keser <[email protected]>

* Ok fixes (#200)

* getHttpHeaders function added

* Function updated to allow nullable request

* Function updated to allow nullable request

* Fixes to pass tests in accordance with respective request class

* fixes failure "Iyzipay\Tests\Request\CreateBasicBkmInitializeRequestTest::test_should_get_json_object"

* fixes failure "6) Iyzipay\Tests\Request\CreateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "7) Iyzipay\Tests\Request\CreateCheckoutFormInitializeRequestTest::test_should_get_json_string"

* fixes failure "8) Iyzipay\Tests\Request\CreateIyziupFormInitializeRequestTest::test_should_get_json_string"

* fixes failure "9) Iyzipay\Tests\Request\CreateIyziupFormInitializeRequestWithInitialConsumerTest::test_should_get_json_string"

* fixes failure "10) Iyzipay\Tests\Request\Subscription\SubscriptionUpgradeRequestTest::test_should_get_json_string"

* fixes failure "11) Iyzipay\Tests\Request\UpdateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "5) Iyzipay\Tests\Request\CreateBasicPaymentRequestTest::test_should_get_json_string"

* fixes failure "6) Iyzipay\Tests\Request\CreateBlacklistedCardRequestTest::test_should_convert_to_pki_request_string"

* fixes failure "1) Iyzipay\Tests\DefaultHttpClientTest::test_should_check_if_options_not_empty"

* fixes error 1 "Call to undefined method..."

* fixes error 2 "file_get_contents/.... Failed to open stream"

* Put, Patch fix

* Put, Patch fix

---------

Co-authored-by: Osman Keser <[email protected]>

---------

Signed-off-by: Erdem Demir <[email protected]>
Co-authored-by: Osman Keser <[email protected]>
Co-authored-by: tarikkamat <[email protected]>
Co-authored-by: Erdem Demir <[email protected]>
  • Loading branch information
4 people authored Sep 23, 2024
1 parent 4f6abcd commit 40ee366
Show file tree
Hide file tree
Showing 191 changed files with 4,750 additions and 153 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/github_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2']
php-versions: ['7.4', '8.0', '8.1', '8.2']
include:
- php-versions: '5.3'
- php-versions: '7.4'

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ build/
composer.lock
composer.phar
vendor/*

.phpunit.result.cache

# PHPFiles
index.php

# VSCode
.vscode

# SonarQube
.scannerwork
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ You can sign up for an iyzico account at https://iyzico.com

# Requirements

PHP 5.6 and later.
PHP 7.4 and later.

### Note

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
}
],
"require": {
"php": ">=5.3.0",
"php": ">=7.4.0",
"ext-curl": "*"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"phpunit/phpunit": "~9.6",
"satooshi/php-coveralls": "~0.6.1"
},
"autoload": {
Expand All @@ -41,4 +41,4 @@
"scripts": {
"test": "vendor/bin/phpunit --colors"
}
}
}
17 changes: 17 additions & 0 deletions samples/amount_base_refund.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

require_once('config.php');

function amountBaseRefund(): void {
$request = new \Iyzipay\Request\AmountBaseRefundRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId('123456789');
$request->setPaymentId('2921546163');
$request->setPrice(3.12);
$request->setIp('85.34.78.112');

$amountBaseRefund = \Iyzipay\Model\AmountBaseRefund::create($request, Config::options());
print_r($amountBaseRefund);
}

amountBaseRefund();
50 changes: 50 additions & 0 deletions samples/callbackUrl_Signature_Validation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

/* You can verify the request using the method below */

$secretKey = "merchant_secret_key";
$conversationData = "conversationData_from_callbackUrl";
$conversationId = "conversationId_from_callbackUrl";
$mdStatus = "mdStatus_from_callbackUrl";
$paymentId = "paymentId_from_callbackUrl";
$status = "status_from_callbackUrl";

$dataToSign = $conversationData.":".$conversationId.":".$mdStatus.":".$paymentId.":".$status ;
$hmac256Signature = bin2hex(hash_hmac('sha256', $dataToSign, $secretKey, true));

$signature = "signature_from_callbackUrl_payload";

if ($hmac256Signature == $signature) {
echo "HMAC-SHA256 Signature Verified: " . $hmac256Signature . "\n";
echo "Enjoy your code...";
} else {
echo "Signature verification failed.\n";
}


/*
* Sample Signature Calculation
*
* Payload: status=success&paymentId=22484292&conversationData=&conversationId=&mdStatus
* =1&signature=a4f73b80bb32a6ef8358090bbd8609a49a7b53f463048f8ef147496e236d04f0
*
* $secretKey = "jLc7GQHD2pyJoqXDeEcTnGHYtP7Ai5jl";
* $conversationData = "";
* $conversationId = "";
* $mdStatus = "1";
* $paymentId = "22484292";
* $status = "success";
*
* $signature = "a4f73b80bb32a6ef8358090bbd8609a49a7b53f463048f8ef147496e236d04f0";
*
* $dataToSign = "::1:22484292:success";
*
* After hashing string with secretKey
* $hmac256Signature = "a4f73b80bb32a6ef8358090bbd8609a49a7b53f463048f8ef147496e236d04f0";
*
* $hmac256Signature is equal to $signature so the request validated.
*/



?>
16 changes: 16 additions & 0 deletions samples/create_blacklisted_card.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

require_once('config.php');

function createBlacklistedCard() {
$request = new \Iyzipay\Request\CreateBlackListedCardRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setCardToken('G7Zzo5Y24cxwaIwC4h+jUJXtqTA=');
$request->setCardUserKey('ew9hzoujBUJgOUer8st0ler0dOQ=');

$blacklistedCard = \Iyzipay\Model\BlacklistedCard::create($request, Config::options());
print_r($blacklistedCard);
}

createBlacklistedCard();
22 changes: 22 additions & 0 deletions samples/create_c2c_sub_merchant.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

require_once('config.php');

function createC2CSubMerchant(): void {
$request = new \Iyzipay\Request\CreateC2CSubMerchantRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId('299487456');
$request->setName('John');
$request->setSurname('Doe');
$request->setEmail('[email protected]');
$request->setGsmNumber('+905558001479');
$request->setTckNo('55555555555');
$request->setBirthDate('1996-10-07');
$request->setAddress('Besiktas / Istanbul');
$request->setExternalId('ccd74b86-e4a8-469e-b3d3-312f0544ea6e');

$c2cSubMerchant = \Iyzipay\Model\C2CSubMerchant::create($request, Config::options());
print_r($c2cSubMerchant);
}

createC2CSubMerchant();
16 changes: 15 additions & 1 deletion samples/create_payment.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

require_once('config.php');
require_once('signature_verification.php');

# create request class
$request = new \Iyzipay\Request\CreatePaymentRequest();
Expand Down Expand Up @@ -88,4 +89,17 @@
$payment = \Iyzipay\Model\Payment::create($request, Config::options());

# print response
print_r($payment);
print_r($payment);

#verify signature
$paymentId = $payment->getPaymentId();
$currency = $payment->getCurrency();
$basketId = $payment->getBasketId();
$conversationId = $payment->getConversationId();
$paidPrice = $payment->getPaidPrice();
$price = $payment->getPrice();
$signature = $payment->getSignature();

$calculatedSignature = calculateHmacSHA256Signature(array($paymentId, $currency, $basketId, $conversationId, $paidPrice, $price));
$verified = $signature == $calculatedSignature;
echo "Signature verified: $verified";
32 changes: 32 additions & 0 deletions samples/create_payment_postauth.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

require_once('config.php');
require_once('signature_verification.php');

# create request class
$request = new \Iyzipay\Request\CreatePaymentPostAuthRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setPaymentId("1");
$request->setPaidPrice("1.2");
$request->setIp("85.34.78.112");
$request->setCurrency(\Iyzipay\Model\Currency::TL);

# make request
$postAuth = \Iyzipay\Model\PaymentPostAuth::create($request, Config::options());

# print result
print_r($postAuth);

#verify signature
$paymentId = $postAuth->getPaymentId();
$currency = $postAuth->getCurrency();
$basketId = $postAuth->getBasketId();
$conversationId = $postAuth->getConversationId();
$paidPrice = $postAuth->getPaidPrice(1);
$price = $postAuth->getPrice();
$signature = $postAuth->getSignature();

$calculatedSignature = calculateHmacSHA256Signature(array($paymentId, $currency, $basketId, $conversationId, $paidPrice, $price));
$verified = $signature == $calculatedSignature;
echo "Signature verified: $verified";
105 changes: 105 additions & 0 deletions samples/create_payment_preauth.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?php

require_once('config.php');
require_once('signature_verification.php');

# create request class
$request = new \Iyzipay\Request\CreatePaymentRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setPrice("1");
$request->setPaidPrice("1.2");
$request->setCurrency(\Iyzipay\Model\Currency::TL);
$request->setInstallment(1);
$request->setBasketId("B67832");
$request->setPaymentChannel(\Iyzipay\Model\PaymentChannel::WEB);
$request->setPaymentGroup(\Iyzipay\Model\PaymentGroup::PRODUCT);

$paymentCard = new \Iyzipay\Model\PaymentCard();
$paymentCard->setCardHolderName("John Doe");
$paymentCard->setCardNumber("5528790000000008");
$paymentCard->setExpireMonth("12");
$paymentCard->setExpireYear("2030");
$paymentCard->setCvc("123");
$paymentCard->setRegisterCard(0);
$request->setPaymentCard($paymentCard);

$buyer = new \Iyzipay\Model\Buyer();
$buyer->setId("BY789");
$buyer->setName("John");
$buyer->setSurname("Doe");
$buyer->setGsmNumber("+905350000000");
$buyer->setEmail("[email protected]");
$buyer->setIdentityNumber("74300864791");
$buyer->setLastLoginDate("2015-10-05 12:43:35");
$buyer->setRegistrationDate("2013-04-21 15:12:09");
$buyer->setRegistrationAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$buyer->setIp("85.34.78.112");
$buyer->setCity("Istanbul");
$buyer->setCountry("Turkey");
$buyer->setZipCode("34732");
$request->setBuyer($buyer);

$shippingAddress = new \Iyzipay\Model\Address();
$shippingAddress->setContactName("Jane Doe");
$shippingAddress->setCity("Istanbul");
$shippingAddress->setCountry("Turkey");
$shippingAddress->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$shippingAddress->setZipCode("34742");
$request->setShippingAddress($shippingAddress);

$billingAddress = new \Iyzipay\Model\Address();
$billingAddress->setContactName("Jane Doe");
$billingAddress->setCity("Istanbul");
$billingAddress->setCountry("Turkey");
$billingAddress->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
$billingAddress->setZipCode("34742");
$request->setBillingAddress($billingAddress);

$basketItems = array();
$firstBasketItem = new \Iyzipay\Model\BasketItem();
$firstBasketItem->setId("BI101");
$firstBasketItem->setName("Binocular");
$firstBasketItem->setCategory1("Collectibles");
$firstBasketItem->setCategory2("Accessories");
$firstBasketItem->setItemType(\Iyzipay\Model\BasketItemType::PHYSICAL);
$firstBasketItem->setPrice("0.3");
$basketItems[0] = $firstBasketItem;

$secondBasketItem = new \Iyzipay\Model\BasketItem();
$secondBasketItem->setId("BI102");
$secondBasketItem->setName("Game code");
$secondBasketItem->setCategory1("Game");
$secondBasketItem->setCategory2("Online Game Items");
$secondBasketItem->setItemType(\Iyzipay\Model\BasketItemType::VIRTUAL);
$secondBasketItem->setPrice("0.5");
$basketItems[1] = $secondBasketItem;

$thirdBasketItem = new \Iyzipay\Model\BasketItem();
$thirdBasketItem->setId("BI103");
$thirdBasketItem->setName("Usb");
$thirdBasketItem->setCategory1("Electronics");
$thirdBasketItem->setCategory2("Usb / Cable");
$thirdBasketItem->setItemType(\Iyzipay\Model\BasketItemType::PHYSICAL);
$thirdBasketItem->setPrice("0.2");
$basketItems[2] = $thirdBasketItem;
$request->setBasketItems($basketItems);

# make request
$payment = \Iyzipay\Model\PaymentPreAuth::create($request, Config::options());

# print response
print_r($payment);

#verify signature
$paymentId = $payment->getPaymentId();
$currency = $payment->getCurrency();
$basketId = $payment->getBasketId();
$conversationId = $payment->getConversationId();
$paidPrice = $payment->getPaidPrice();
$price = $payment->getPrice();
$signature = $payment->getSignature();

$calculatedSignature = calculateHmacSHA256Signature(array($paymentId, $currency, $basketId, $conversationId, $paidPrice, $price));
$verified = $signature == $calculatedSignature;
echo "Signature verified: $verified";
15 changes: 14 additions & 1 deletion samples/create_payment_with_registered_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,17 @@
$payment = \Iyzipay\Model\Payment::create($request, Config::options());

# print response
print_r($payment);
print_r($payment);

#verify signature
$paymentId = $payment->getPaymentId();
$currency = $payment->getCurrency();
$basketId = $payment->getBasketId();
$conversationId = $payment->getConversationId();
$paidPrice = $payment->getPaidPrice();
$price = $payment->getPrice();
$signature = $payment->getSignature();

$calculatedSignature = calculateHmacSHA256Signature(array($paymentId, $currency, $basketId, $conversationId, $paidPrice, $price));
$verified = $signature == $calculatedSignature;
echo "Signature verified: $verified";
Loading

0 comments on commit 40ee366

Please sign in to comment.