Skip to content

v4 - #8

Open
amlfares31 wants to merge 3 commits into
mainfrom
v4
Open

v4#8
amlfares31 wants to merge 3 commits into
mainfrom
v4

Conversation

@amlfares31

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread lib/Paymob/Paymob.php
private $base_url;

function __construct($secret_key=null)
function __construct($secret_key=null,$api_version=null,$base_url=null)

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread lib/test.php
$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
Copy Markdown
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.

Comment thread lib/test.php
"state"=> "Utah",
],
$delivery_needed=False,);
echo $app->intent->create('',$secret_key,$body);

Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants