diff --git a/Brewfile b/Brewfile new file mode 100644 index 0000000..823de59 --- /dev/null +++ b/Brewfile @@ -0,0 +1,36 @@ +tap "dart-lang/dart" +tap "homebrew/bundle" +tap "homebrew/cask" +tap "homebrew/core" +tap "hudochenkov/sshpass" +tap "isen-ng/dotnet-sdk-versions" +brew "apr-util" +brew "cocoapods", link: false +brew "libssh2" +brew "openldap" +brew "curl" +brew "freetds" +brew "gh" +brew "glib" +brew "helm" +brew "jq" +brew "krb5" +brew "kubernetes-cli" +brew "libpq" +brew "nghttp2" +brew "node" +brew "openssl@1.1" +brew "node@14" +brew "node@16" +brew "node@18", link: true +brew "nvm" +brew "openfortivpn" +brew "php@7.4", link: true +brew "python@3.9" +brew "redis" +brew "yarn" +brew "zsh" +brew "dart-lang/dart/dart" +brew "hudochenkov/sshpass/sshpass" +cask "dotnet-sdk3-1-300" +cask "iterm2" diff --git a/README.md b/README.md index 45bfc25..4155356 100644 --- a/README.md +++ b/README.md @@ -111,23 +111,6 @@ $response = $craftgate->payment()->createPayment($request); var_dump($response); ``` -### Advanced Usage: Adapters -In reality, the `Craftgate` class serves as a provider of adapters that integrates with different parts of the API. While the intended usage for most use-cases is to instantiate a `Craftgate` instance (as illustrated in the examples above) and use its adapter initializers (e.g. `payment()`). - -**Note:** When instantiating an adapter, you can use the same options as you would when instantiating a `Craftgate` - -All adapters in the `Craftgate` have their purposes and initializers that listed below: - -| Adapter Name | Purpose | Initializer | -|--------------|---------|----------| -| `InstallmentAdapter` | Retrieving per-installment pricing information based on installment count or BIN number | `installment()` | -| `OnboardingAdapter` | Conducting CRUD operations on buyers and sub merchants | `onboarding()` | -| `PaymentAdapter` | Conducting payments, retrieving payment information, managing stored cards | `payment()` | -| `WalletAdapter` | Managing remittance, retrieving wallet transactions | `wallet()` | -| `SettlementAdapter` | Settlement operations like create instant wallet settlement | `settlement()` | -| `SettlementReportingAdapter` | Settlement operations like search payout completed transactions, search bounced payout transactions | `settlementReporting()` | -| `PaymentReportingAdapter` | Payment reporting operations like search payments | `paymentReporting()` | - ### Contributions For all contributions to this client please see the contribution guide [here](CONTRIBUTING.md). diff --git a/samples/retrieve_bank_account_tracking_record.php b/samples/retrieve_bank_account_tracking_record.php new file mode 100644 index 0000000..ac4cd45 --- /dev/null +++ b/samples/retrieve_bank_account_tracking_record.php @@ -0,0 +1,7 @@ +bankAccountTracking()->retrieveRecord(1); + +print_r($response); diff --git a/samples/search_bank_account_tracking_records.php b/samples/search_bank_account_tracking_records.php new file mode 100644 index 0000000..0f0d674 --- /dev/null +++ b/samples/search_bank_account_tracking_records.php @@ -0,0 +1,15 @@ + 0, + 'size' => 10, + "currency" => Currency::TL +); + +$response = SampleConfig::craftgate()->bankAccountTracking()->searchRecords($request); + +print_r($response); diff --git a/src/Adapter/BankAccountTrackingAdapter.php b/src/Adapter/BankAccountTrackingAdapter.php new file mode 100644 index 0000000..053491a --- /dev/null +++ b/src/Adapter/BankAccountTrackingAdapter.php @@ -0,0 +1,20 @@ +httpGet($path); + } + + public function retrieveRecord($id) + { + $path = "/bank-account-tracking/v1/merchant-bank-account-trackings/records/" . $id; + return $this->httpGet($path); + } +} diff --git a/src/Craftgate.php b/src/Craftgate.php index 255a2b9..3130098 100644 --- a/src/Craftgate.php +++ b/src/Craftgate.php @@ -2,6 +2,7 @@ namespace Craftgate; +use Craftgate\Adapter\BankAccountTrackingAdapter; use Craftgate\Adapter\FileReportingAdapter; use Craftgate\Adapter\FraudAdapter; use Craftgate\Adapter\HookAdapter; @@ -106,4 +107,9 @@ public function masterpass() { return new MasterpassPaymentAdapter($this->options); } + + public function bankAccountTracking() + { + return new BankAccountTrackingAdapter($this->options); + } } diff --git a/x.html b/x.html deleted file mode 100644 index febe6a5..0000000 --- a/x.html +++ /dev/null @@ -1 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"<>> <html xmlns="http://www.w3.org/1999/xhtml"<>> <head<>><title<>> </title<>><script type="text/javascript" src="/MPI/ruxitagentjs_ICA27NVfqrux_10245220704125537.js" data-dtconfig="rid=RID_-1692461118|rpid=280015469|domain=denizbank.com|reportUrl=/MPI/rb_d0ac9e6b-b11a-4747-9900-8db5d8d1e8c3|app=600f804e2f46f262|featureHash=ICA27NVfqrux|vcv=2|rdnt=1|uxrgce=1|bp=3|cuc=w2s3jly9|mel=100000|dpvc=1|ssv=4|lastModification=1687140590492|dtVersion=10245220704125537|tp=500,50,0,1|agentUri=/MPI/ruxitagentjs_ICA27NVfqrux_10245220704125537.js"<>></script<>></head<>> <body<>> <form method="post" action="./Default.aspx" id="form1"<>> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="SUqMoBpYlbdD8egWK6OtmQp+3CKkKMuZikE973A8kXSz4/JoC6rSnEvIV5uMnqa3bPwYM1nSqOBi94w3DTVn4ZD14pgUjoJBkBxEQlkfnQGQ1zw0J5Df7X0opUw=" /<>> <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="AF18754F" /<>> <div<>> </div<>> </form<>><img style="display:none" src="https://posws.param.com.tr/api/paramapi/status?SID=a2a8a232-6b6b-436d-bf41-4b1831763a2c"/<>> </body<>> </html<>> <!DOCTYPE html SYSTEM 'about:legacy-compat'<>> <html class='no-js' lang='en' xmlns='http://www.w3.org/1999/xhtml'<>> <head<>> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/<>> <meta charset='utf-8'/<>> <title<>>3D Secure Processing</title<>> </head<>> <body<>> <div id='main'<>> <div id='content'<>> <div id='order'<>> <h2<>>3D Secure Processing</h2<>> <img src='preloader.gif' alt='Please wait..'/<>> <div id='formdiv'<>> <script type='text/javascript'<>> function hideAndSubmitTimed(formid) { var timer=setTimeout(function() {hideAndSubmit(formid)},10); } function hideAndSubmit(formid) { var formx=document.getElementById(formid); if (formx!=null) { formx.style.visibility='hidden'; formx.submit(); } } </script<>> <div<>> <form id='threeDSServerWebFlowStartForm' name='threeDSServerWebFlowStartForm' method='POST' action='https://emvtds.bkm.com.tr/tds/resultFlow'<>> <input type='hidden' name='threeDSServerWebFlowStart' value='eyJhbGciOiJIUzI1NiJ9.ewogICJ0aHJlZURTU2VydmVyV2ViRmxvd1N0YXJ0IiA6IHsKICAgICJhY3F1aXJlcklEIiA6ICIxMzQiLAogICAgInRocmVlRFNTZXJ2ZXJUcmFuc0lEIiA6ICJiNWNjZTNkZC05OWQyLTQ0YTUtOThmZS02YTU2ZDVkZGIwMzQiLAogICAgInRocmVlRFNSZXF1ZXN0b3JUcmFuc0lEIiA6ICJENjg5QTFENC1BMUU3LTRFMzctOTM5NS04OTdBRTM5NEYwQTMiLAogICAgInRpbWVab25lIiA6ICJVVEMrMDM6MDAiLAogICAgInRpbWVTdGFtcCIgOiAiMjAyMzA2MTkxMzQwMzAiLAogICAgInZlcnNpb24iIDogIjEuMC4wIgogIH0KfQ.ct5Y9D8sEocPCDklOwBoDuaA5B5aoUFpu8Ti07H7hEA'/<>> <input type='hidden' name='browserColorDepth' value=''/<>> <input type='hidden' name='browserScreenHeight' value=''/<>> <input type='hidden' name='browserScreenWidth' value=''/<>> <input type='hidden' name='browserTZ' value=''/<>> <input type='hidden' name='browserJavascriptEnabled' value=''/<>> <input type='hidden' name='browserJavaEnabled' value=''/<>> <input type='hidden' name='browserLanguage' value=''/<>> <script type='text/javascript'<>> hideAndSubmitTimed('threeDSServerWebFlowStartForm'); </script<>> <script type='text/javascript'<>> function collectBrowserInformation(formid) { var form=document.getElementById(formid); if (form!=null) { if (form['browserJavascriptEnabled']!=null) { // if this script runs js is enabled form['browserJavascriptEnabled'].value="true"; } if (form['browserJavaEnabled']!=null) { form['browserJavaEnabled'].value=navigator.javaEnabled(); } if (form['browserColorDepth']!=null) { form['browserColorDepth'].value=screen.colorDepth; } if (form['browserScreenHeight']!=null) { form['browserScreenHeight'].value=screen.height; } if (form['browserScreenWidth']!=null) { form['browserScreenWidth'].value=screen.width; } var timezoneOffsetField=form['browserTZ']; if (timezoneOffsetField!=null) { timezoneOffsetField.value=new Date().getTimezoneOffset(); } if (form['browserLanguage']!=null) { form['browserLanguage'].value=navigator.language; } } } collectBrowserInformation('threeDSServerWebFlowStartForm'); </script<>> <noscript<>> <div align='center'<>> <b<>>Javascript is turned off or not supported!</b<>> <br/<>> </div<>> </noscript<>> <input type='submit' name='submitBtn' value='Please click here to continue'/<>> </form<>><img style="display:none" src="https://posws.param.com.tr/api/paramapi/status?SID=a2a8a232-6b6b-436d-bf41-4b1831763a2c"/<>> </div<>> </div<>> </div<>> <div id='content-footer'<>> <br/<>> </div<>> </div<>> </div<>> </body<>> </html<>> \ No newline at end of file