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

Add success and failure URLs to confirmOrderReference field mapping #79

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions PayWithAmazon/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@ public function setOrderReferenceDetails($requestParameters = array())
* @param requestParameters['merchant_id'] - [String]
* @param requestParameters['amazon_order_reference_id'] - [String]
* @optional requestParameters['mws_auth_token'] - [String]
* @optional requestParameters['success_url'] - [String]
* @optional requestParameters['failure_url'] - [String]
*/

public function confirmOrderReference($requestParameters = array())
Expand All @@ -574,9 +576,11 @@ public function confirmOrderReference($requestParameters = array())
$requestParameters = array_change_key_case($requestParameters, CASE_LOWER);

$fieldMappings = array(
'merchant_id' => 'SellerId',
'merchant_id' => 'SellerId',
'amazon_order_reference_id' => 'AmazonOrderReferenceId',
'mws_auth_token' => 'MWSAuthToken'
'mws_auth_token' => 'MWSAuthToken',
'success_url' => 'SuccessUrl',
'failure_url' => 'FailureUrl'
);

$responseObject = $this->setParametersAndPost($parameters, $fieldMappings, $requestParameters);
Expand Down
6 changes: 4 additions & 2 deletions UnitTests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,11 @@ public function testConfirmOrderReference()
{
$client = new Client($this->configParams);
$fieldMappings = array(
'merchant_id' => 'SellerId',
'merchant_id' => 'SellerId',
'amazon_order_reference_id' => 'AmazonOrderReferenceId',
'mws_auth_token' => 'MWSAuthToken'
'mws_auth_token' => 'MWSAuthToken',
'success_url' => 'SuccessUrl',
'failure_url' => 'FailureUrl'
);

$action = 'ConfirmOrderReference';
Expand Down