Ejegg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/238803
Change subject: Merge branch 'amazon'
......................................................................
Merge branch 'amazon'
e9b0914 Add payWithAmazon feature branch
7a2590b Clear out old Amazon code to prepare for PwA
0b458f8 Switch Amazon to Mustache form, add modules
752155e Redirect to Amazon for login
1b03769 Add Amazon wallet widget
2c7de69 Add pay with Amazon SDK composer package
e2c2b10 Add Amazon API endpoint
ebc4c1f Move Amazon Widget script and return URL into account
92c92ea Use modern hook registration for Amazon
3557613 Clean up a bit of Amazon javascript
1dc9d35 Authorize and capture Amazon payment
322c8ee Amazon code cleanup
66405f6 Add amount and currency to Amazon API post
762dfdb Quit validating that order_id is numeric
6f0b6b0 Move Amazon test responses into their own files
ea84a1b Allow callables in GatewayAdapter::$error_map
c2a5959 Handle results of Amazon API calls
5e8e6c9 Don't submit an Amazon payment with invalid amount
38019a9 Bring Amazon branch back to normal Mustache templates
Change-Id: I3189123febbfab946f9c1bf98932f9c16aca9209
---
M .gitreview
M DonationInterfaceFormSettings.php
M amazon_gateway/amazon_gateway.body.php
M gateway_forms/mustache/payment_method.html.mustache
M gateway_forms/mustache/personal_info.html.mustache
5 files changed, 2 insertions(+), 76 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface
refs/changes/03/238803/1
diff --git a/.gitreview b/.gitreview
index 9009f43..24d9ed1 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
host=gerrit.wikimedia.org
port=29418
project=mediawiki/extensions/DonationInterface.git
-defaultbranch=amazon
+defaultbranch=master
defaultrebase=0
diff --git a/DonationInterfaceFormSettings.php
b/DonationInterfaceFormSettings.php
index 6c9f5dc..ad50cba 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -7,29 +7,6 @@
$forms_whitelist = array();
$form_dirs = $wgDonationInterfaceFormDirs;
-<<<<<<< HEAD (ce6937 Worldpay resultswitcher)
-/**********
- * Amazon *
- **********/
-/**
- * DISABLED 2015-08-21, the simplepay API is no longer supported.
- *
- * $forms_whitelist['amazon'] = array(
- * 'file' => $form_dirs['amazon'] . '/amazon.html',
- * 'gateway' => 'amazon',
- * 'payment_methods' => array('amazon' => 'ALL'),
- * 'redirect',
- * );
- *
- * $forms_whitelist['amazon-recurring'] = array(
- * 'file' => $form_dirs['amazon'] . '/amazon-recurring.html',
- * 'gateway' => 'amazon',
- * 'payment_methods' => array('amazon' => 'ALL'),
- * 'redirect',
- * 'recurring',
- * );
-*/
-=======
/*
* Amazon dummy config - see AstroPay
*/
@@ -43,7 +20,6 @@
'payment_methods' => array('amazon' => 'ALL'),
'recurring',
);
->>>>>>> BRANCH (38019a Bring Amazon branch back to normal Mustache templates)
/****************************
* Bank Transfer - Two-Step *
diff --git a/amazon_gateway/amazon_gateway.body.php
b/amazon_gateway/amazon_gateway.body.php
index 529a1cb..87dbcf8 100644
--- a/amazon_gateway/amazon_gateway.body.php
+++ b/amazon_gateway/amazon_gateway.body.php
@@ -36,50 +36,7 @@
$this->getOutput()->addModules(
'ext.donationinterface.amazon.styles' );
$this->getOutput()->addModules(
'ext.donationinterface.amazon.scripts' );
-<<<<<<< HEAD (ce6937 Worldpay resultswitcher)
- if ( $this->validateForm() ) {
- $this->displayForm();
- } else {
- if ( $this->getRequest()->getText( 'redirect', 0 ) ) {
- if ( $this->getRequest()->getText( 'ffname',
'default' ) === 'amazon-recurring'
- || $this->getRequest()->getText(
'recurring', 0 )
- ) {
- // FIXME: do this in the form param
harvesting step
- $this->adapter->addRequestData( array(
- 'recurring' => 1,
- ) );
- }
- $this->adapter->doPayment();
- // TODO: move redirect here.
- return;
- }
-
- // TODO: move resultswitching out
- $this->logger->info( 'At gateway return with params: '
. json_encode( $this->getRequest()->getValues() ) );
- if ( $this->adapter->checkTokens() &&
$this->getRequest()->getText( 'status' ) ) {
- $this->adapter->do_transaction(
'ProcessAmazonReturn' );
-
- $status = $this->adapter->getFinalStatus();
-
- // FIXME: Isn't this why we have
$goToThankYouOn?
- if ( $status === FinalStatus::COMPLETE ||
$status === FinalStatus::PENDING ) {
- $this->getOutput()->redirect(
$this->adapter->getThankYouPage() );
- }
- else {
- $this->displayFailPage();
- }
- } else {
- $specialform = $this->getRequest()->getText(
'ffname', null );
- if ( !is_null( $specialform ) &&
$this->adapter->isValidSpecialForm( $specialform ) ){
- $this->displayForm();
- } else {
- $this->logger->error( 'Failed to
process gateway return. Tokens bad or no status.' );
- }
- }
- }
-=======
$this->validateForm();
$this->displayForm();
->>>>>>> BRANCH (38019a Bring Amazon branch back to normal Mustache templates)
}
}
diff --git a/gateway_forms/mustache/payment_method.html.mustache
b/gateway_forms/mustache/payment_method.html.mustache
index 5174cb8..3fed354 100644
--- a/gateway_forms/mustache/payment_method.html.mustache
+++ b/gateway_forms/mustache/payment_method.html.mustache
@@ -8,11 +8,7 @@
<li title="{{ label }}"><input id="submethod-{{ key }}"
name="payment_submethod" type="radio" value="{{ key }}" class="cardradio" />
<label for="submethod-{{ key }}"><img alt="{{ label }}" src="{{ logo }}"
/></label></li>
{{/ submethods }}
</ul>
-<<<<<<< HEAD (ce6937 Worldpay resultswitcher)
{{/ payment_submethod_required }}
-
<div id="paymentContinue" > <input class="btn enabled" id="paymentContinueBtn"
type="button" value="{{ l10n "donate_interface-continue" }}" /></div>
-=======
->>>>>>> BRANCH (38019a Bring Amazon branch back to normal Mustache templates)
</dd>
</dl>
<div
id="paymentContinue" > <input class="btn enabled" id="paymentContinueBtn"
type="button" value="{{ l10n "donate_interface-continue" }}" /></div>
diff --git a/gateway_forms/mustache/personal_info.html.mustache
b/gateway_forms/mustache/personal_info.html.mustache
index 527d7d9..000aaea 100644
--- a/gateway_forms/mustache/personal_info.html.mustache
+++ b/gateway_forms/mustache/personal_info.html.mustache
@@ -11,7 +11,7 @@
<input
class="fullwidth" name="email" value="{{ email }}" type="email" title="{{ l10n
"donate_interface-donor-email" }}" placeholder="{{ l10n
"donate_interface-donor-email" }}" id="email" required>
</td>
</tr>
-<<<<<<< HEAD (ce6937 Worldpay resultswitcher)
+{{/ email_required }}
{{# address_required }}
<tr>
<td>
@@ -24,9 +24,6 @@
</td>
</tr>
{{/ address_required }}
-=======
-{{/ email_required }}
->>>>>>> BRANCH (38019a Bring Amazon branch back to normal Mustache templates)
{{# fiscal_number_required }}
<tr>
<td>
--
To view, visit https://gerrit.wikimedia.org/r/238803
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3189123febbfab946f9c1bf98932f9c16aca9209
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits