Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency Error if you remove [optional] currency parameter. #15

Open
jayxd-com opened this issue Aug 18, 2018 · 0 comments
Open

Currency Error if you remove [optional] currency parameter. #15

jayxd-com opened this issue Aug 18, 2018 · 0 comments

Comments

@jayxd-com
Copy link

I don't have permission to update branch so let me give you the solution here.

Solution:
There was an error if we don't use optional currency in controller. It was under displayRedirectionPage function in PayfortRedirectRequest trait. Amount parameter was expecting a value from that array. I have updated the trait function by using laravel data_get as used for currency attribute.

Update the following parameter currency as follows.

// Traits/PayfortRedirectRequest.php

public function displayRedirectionPage($data)
{
//Other Parameters

  'amount' => $this->getPayfortAmount($data['amount'], data_get($data, 'currency', $this->config['currency'])),

//Other Parameters
}

Please update the repository, Thank you. Great work by the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant