Skip to content

Conversation

@amlfares31
Copy link
Collaborator

No description provided.

private $base_url;

function __construct($secret_key=null)
function __construct($secret_key=null,$api_version=null,$base_url=null)
Copy link
Contributor

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";
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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 ????

Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

3 participants