Skip to content

Commit 736c3bd

Browse files
committed
Use getCurrencyNumeric() instead of getCurrency()
1 parent 49108e6 commit 736c3bd

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Message/PurchaseRequest.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,17 @@ class PurchaseRequest extends AbstractRequest
1919
'test' => 'https://sanalposprovtest.garanti.com.tr/VPServlet',
2020
'purchase' => 'https://sanalposprov.garanti.com.tr/VPServlet',
2121
);
22-
protected $currencyCodes = array(
23-
'TRY' => 949,
24-
'YTL' => 949,
25-
'TRL' => 949,
26-
'TL' => 949,
27-
'USD' => 840,
28-
'EUR' => 978,
29-
'GBP' => 826,
30-
'JPY' => 392,
31-
);
3222

3323
public function getData()
3424
{
3525
$this->validate('amount', 'card');
3626
$this->getCard()->validate();
37-
$currency = $this->getCurrency();
3827

3928
$data['Transaction'] = array(
4029
'Type' => $this->actionType,
4130
'InstallmentCnt' => $this->getInstallment(),
4231
'Amount' => $this->getAmountInteger(),
43-
'CurrencyCode' => $this->currencyCodes[$currency],
32+
'CurrencyCode' => $this->getCurrencyNumeric(),
4433
'CardholderPresentCode' => "0",
4534
'MotoInd' => "N",
4635
'Description' => "",

0 commit comments

Comments
 (0)