Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391018 )
Change subject: Pass proxy parameters to Amazon SDK ...................................................................... Pass proxy parameters to Amazon SDK TODO: standard proxy settings in provider-defaults? Bug: T180168 Change-Id: Iff1f58337d508a78d3530b0b82ade6a49351c0ee --- M PaymentProviders/Amazon/AmazonApi.php M config/amazon/main.yaml 2 files changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/18/391018/1 diff --git a/PaymentProviders/Amazon/AmazonApi.php b/PaymentProviders/Amazon/AmazonApi.php index aee1861..8c5ba88 100644 --- a/PaymentProviders/Amazon/AmazonApi.php +++ b/PaymentProviders/Amazon/AmazonApi.php @@ -40,7 +40,8 @@ public static function createIpnHandler( $headers, $body ) { $config = Context::get()->getProviderConfiguration(); $klass = $config->val( 'ipn-handler-class' ); - return new $klass( $headers, $body ); + $proxy = $config->val( 'proxy' ); + return new $klass( $headers, $body, $proxy ); } /** diff --git a/config/amazon/main.yaml b/config/amazon/main.yaml index b5d18b1..a305af4 100644 --- a/config/amazon/main.yaml +++ b/config/amazon/main.yaml @@ -27,16 +27,25 @@ region: '' sandbox: false +proxy: &PROXY + cabundle_file: ~ # /path/to/file + proxy_host: ~ # 192.168.1.1 + proxy_port: -1 # 8080 + proxy_username: ~ # proxyme + proxy_password: ~ # plz + # Override these to mock the Amazon SDK classes payments-client: class: PayWithAmazon\PaymentsClient constructor-parameters: - <<: *CREDENTIALS + <<: *PROXY reports-client: class: PayWithAmazon\ReportsClient constructor-parameters: - <<: *CREDENTIALS + <<: *PROXY ipn-handler-class: PayWithAmazon\IpnHandler @@ -45,4 +54,4 @@ archive-path: "" file-types: - SmashPig\PaymentProviders\Amazon\Audit\RefundReport - - SmashPig\PaymentProviders\Amazon\Audit\SettlementReport \ No newline at end of file + - SmashPig\PaymentProviders\Amazon\Audit\SettlementReport -- To view, visit https://gerrit.wikimedia.org/r/391018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff1f58337d508a78d3530b0b82ade6a49351c0ee Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Ejegg <ej...@ejegg.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits