Skip to content

Commit c51f5b8

Browse files
author
shlokgilda
committed
Updated readme.
Signed-off-by: shlokgilda <shlok@ost.com>
1 parent d8ccaf0 commit c51f5b8

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -434,24 +434,21 @@ For executing transactions, you need to understand the 4 modules described below
434434
// into tokens. Use get price point detail API of Price Points module to get this value.
435435
$pricePoint = 0.020606673;
436436

437-
// Price point needs to be passed in atto. Also, this value should be a string. You might need to increase
438-
// precision of PHP depending on your use-case. Example = ini_set('precision', 25);
439-
$intendedPricePoint = (string)($pricePoint * 10**18);
437+
// Price point needs to be passed in atto. Multiply the price point with 10^18. Also, this value should be a string.
438+
// You might need to increase precision of PHP depending on your use-case. Example = ini_set('precision', 25);
439+
$intendedPricePointInAtto = (string)($pricePoint * 10**18);
440440

441441
// Amount of Fiat to be transferred.
442442
$transferAmountInFiat = 0.1;
443443

444-
// Decimal places obtained from the get price points API of Price Points module. Possible values: 6 and 18.
445-
$decimalPlaces = 18;
446-
447-
// Transfer amount in wei. Multiply the fiat transfer amount with 10^decimalPlaces. You might need to increase
448-
// precision of PHP depending on your use-case. Example = ini_set('precision', 25);
449-
$fiatTransferAmountInWei = (string)($transferAmountInFiat * 10**$decimalPlaces);;
444+
// Transfer amount in wei needs to be passed in atto. Multiply the fiat transfer amount with 10^18. Also, this value should be a string.
445+
// You might need to increase precision of PHP depending on your use-case. Example = ini_set('precision', 25);
446+
$fiatTransferAmountInAtto = (string)($transferAmountInFiat * 10**18);;
450447

451448
// Parameters required for rule execution.
452449
$rawCallData = array();
453450
$rawCallData['method'] = 'pay';
454-
$rawCallData['parameters'] = array($companyTokenHolderAddress, array($transferToAddress), array($fiatTransferAmountInWei), $payCurrencyCode, $intendedPricePoint);
451+
$rawCallData['parameters'] = array($companyTokenHolderAddress, array($transferToAddress), array($fiatTransferAmountInAtto), $payCurrencyCode, $intendedPricePointInAtto);
455452

456453
// Company userId.
457454
$companyUserId = 'ee8___';
@@ -804,4 +801,4 @@ For executing transactions, you need to understand the 4 modules described below
804801

805802
$response = $webhooksService->verifySignature($params);
806803
echo json_encode($response, JSON_PRETTY_PRINT);
807-
```
804+
```

0 commit comments

Comments
 (0)