-
Notifications
You must be signed in to change notification settings - Fork 0
v4 #8
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
base: main
Are you sure you want to change the base?
v4 #8
Conversation
| private $base_url; | ||
|
|
||
| function __construct($secret_key=null) | ||
| function __construct($secret_key=null,$api_version=null,$base_url=null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base_url should have "https://flashapi.paymob.com/" as a default.
| //return: str api_next_url | ||
| $api_next_url = "http://127.0.0.1:8000/api/next"; | ||
| return $api_next_url; | ||
| $api_next_url = $base_url."/api/next"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to use that anymore, remove it.
| $delivery_needed=False,); | ||
| $base_url="http://127.0.0.1:8000"; | ||
| $api_version="v1"; | ||
| $app=new Paymob($secret_key,$base_url,$$api_version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither the base_url nor the api_version should be mandate.
| "state"=> "Utah", | ||
| ], | ||
| $delivery_needed=False,); | ||
| echo $app->intent->create('',$secret_key,$body); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we send the secret_key again ????
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's optional we don't need to send it again.
No description provided.