Skip to content

Commit

Permalink
Add INR currency (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
alankarmore authored and srmklive committed Jul 17, 2018
1 parent c89d2ff commit ef8faf4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Traits/PayPalRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private function setApiProviderConfiguration($credentials)

// Setup PayPal API Signature value to use.
$this->config['signature'] = empty($this->config['certificate']) ?
$this->config['secret'] : $this->config['certificate'];
$this->config['secret'] : $this->config['certificate'];

$this->paymentAction = $credentials['payment_action'];

Expand Down Expand Up @@ -299,7 +299,7 @@ public function addOptions(array $options)
*/
public function setCurrency($currency = 'USD')
{
$allowedCurrencies = ['AUD', 'BRL', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'JPY', 'MYR', 'MXN', 'NOK', 'NZD', 'PHP', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'TWD', 'THB', 'USD', 'RUB'];
$allowedCurrencies = ['AUD', 'BRL', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'INR', 'JPY', 'MYR', 'MXN', 'NOK', 'NZD', 'PHP', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'TWD', 'THB', 'USD', 'RUB'];

// Check if provided currency is valid.
if (!in_array($currency, $allowedCurrencies)) {
Expand Down Expand Up @@ -344,7 +344,7 @@ public function verifyIPN($post)
{
$this->setRequestData($post);

$this->apiUrl = $this->config['gateway_url'].'/cgi-bin/webscr';
$this->apiUrl = $this->config['gateway_url'] . '/cgi-bin/webscr';

return $this->doPayPalRequest('verifyipn');
}
Expand All @@ -357,11 +357,11 @@ public function verifyIPN($post)
private function createRequestPayload($method)
{
$config = array_merge([
'USER' => $this->config['username'],
'PWD' => $this->config['password'],
'USER' => $this->config['username'],
'PWD' => $this->config['password'],
'SIGNATURE' => $this->config['signature'],
'VERSION' => 123,
'METHOD' => $method,
'VERSION' => 123,
'METHOD' => $method,
], $this->options);

$this->post = $this->post->merge($config);
Expand Down

0 comments on commit ef8faf4

Please sign in to comment.