Page MenuHomePhabricator

D10654.id25592.diff
No OneTemporary

D10654.id25592.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -306,11 +306,6 @@
'rsrc/image/people/mckinley.png' => 'fb8f16ce',
'rsrc/image/people/taft.png' => 'd7bc402c',
'rsrc/image/people/washington.png' => '40dd301c',
- 'rsrc/image/phortune/balanced.png' => 'f6ba2691',
- 'rsrc/image/phortune/paypal.png' => '9747cb33',
- 'rsrc/image/phortune/stripe.png' => 'bfedc2ce',
- 'rsrc/image/phortune/test.png' => '0235d8a7',
- 'rsrc/image/phortune/wepay.png' => 'b37163ce',
'rsrc/image/phrequent_active.png' => 'a466a8ed',
'rsrc/image/phrequent_inactive.png' => 'bfc15a69',
'rsrc/image/search-white.png' => '64cc0d45',
diff --git a/src/applications/phortune/controller/PhortuneAccountViewController.php b/src/applications/phortune/controller/PhortuneAccountViewController.php
--- a/src/applications/phortune/controller/PhortuneAccountViewController.php
+++ b/src/applications/phortune/controller/PhortuneAccountViewController.php
@@ -130,7 +130,6 @@
$provider = $method->buildPaymentProvider();
$item->addAttribute($provider->getPaymentMethodProviderDescription());
- $item->setImageURI($provider->getPaymentMethodIcon());
$edit_uri = $this->getApplicationURI('card/'.$id.'/edit/');
diff --git a/src/applications/phortune/controller/PhortuneCartCheckoutController.php b/src/applications/phortune/controller/PhortuneCartCheckoutController.php
--- a/src/applications/phortune/controller/PhortuneCartCheckoutController.php
+++ b/src/applications/phortune/controller/PhortuneCartCheckoutController.php
@@ -161,7 +161,7 @@
$add_providers = $this->loadCreatePaymentMethodProvidersForMerchant(
$merchant);
if ($add_providers) {
- $new_method = phutil_tag(
+ $new_method = javelin_tag(
'a',
array(
'class' => 'button grey',
diff --git a/src/applications/phortune/controller/PhortuneController.php b/src/applications/phortune/controller/PhortuneController.php
--- a/src/applications/phortune/controller/PhortuneController.php
+++ b/src/applications/phortune/controller/PhortuneController.php
@@ -27,7 +27,7 @@
$rows[] = array(
$charge->getID(),
$cart_href,
- $charge->getPaymentProviderKey(),
+ $charge->getProviderPHID(),
$charge->getPaymentMethodPHID(),
$charge->getAmountAsCurrency()->formatForDisplay(),
$charge->getStatus(),
diff --git a/src/applications/phortune/controller/PhortunePaymentMethodCreateController.php b/src/applications/phortune/controller/PhortunePaymentMethodCreateController.php
--- a/src/applications/phortune/controller/PhortunePaymentMethodCreateController.php
+++ b/src/applications/phortune/controller/PhortunePaymentMethodCreateController.php
@@ -29,8 +29,12 @@
return new Aphront404Response();
}
- $cancel_uri = $this->getApplicationURI($account->getID().'/');
- $account_uri = $this->getApplicationURI($account->getID().'/');
+ $cart_id = $request->getInt('cartID');
+ if ($cart_id) {
+ $cancel_uri = $this->getApplicationURI("cart/{$cart_id}/checkout/");
+ } else {
+ $cancel_uri = $this->getApplicationURI($account->getID().'/');
+ }
$providers = $this->loadCreatePaymentMethodProvidersForMerchant($merchant);
if (!$providers) {
@@ -58,7 +62,7 @@
->setTitle(pht('Add Payment Method'))
->appendParagraph(pht('Choose a payment method to add:'))
->appendChild($content)
- ->addCancelButton($account_uri);
+ ->addCancelButton($cancel_uri);
}
$provider = $providers[$provider_id];
@@ -107,11 +111,11 @@
// If we added this method on a cart flow, return to the cart to
// check out.
- $cart_id = $request->getInt('cartID');
if ($cart_id) {
$next_uri = $this->getApplicationURI(
"cart/{$cart_id}/checkout/?paymentMethodID=".$method->getID());
} else {
+ $account_uri = $this->getApplicationURI($account->getID().'/');
$next_uri = new PhutilURI($account_uri);
$next_uri->setFragment('payment');
}
@@ -140,7 +144,7 @@
->appendChild(
id(new AphrontFormSubmitControl())
->setValue(pht('Add Payment Method'))
- ->addCancelButton($account_uri));
+ ->addCancelButton($cancel_uri));
$box = id(new PHUIObjectBoxView())
->setHeaderText($provider->getPaymentMethodDescription())
@@ -172,18 +176,20 @@
$this->requireResource('phortune-css');
$icon = id(new PHUIIconView())
- ->setImage($icon_uri)
- ->addClass('phortune-payment-icon');
+ ->setSpriteSheet(PHUIIconView::SPRITE_LOGIN)
+ ->setSpriteIcon($provider->getPaymentMethodIcon());
$button = id(new PHUIButtonView())
->setSize(PHUIButtonView::BIG)
->setColor(PHUIButtonView::GREY)
->setIcon($icon)
->setText($description)
- ->setSubtext($details);
+ ->setSubtext($details)
+ ->setMetadata(array('disableWorkflow' => true));
$form = id(new AphrontFormView())
->setUser($viewer)
+ ->setAction($request->getRequestURI())
->addHiddenInput('providerID', $provider->getProviderConfig()->getID())
->appendChild($button);
diff --git a/src/applications/phortune/provider/PhortuneBalancedPaymentProvider.php b/src/applications/phortune/provider/PhortuneBalancedPaymentProvider.php
--- a/src/applications/phortune/provider/PhortuneBalancedPaymentProvider.php
+++ b/src/applications/phortune/provider/PhortuneBalancedPaymentProvider.php
@@ -121,7 +121,7 @@
}
public function getPaymentMethodIcon() {
- return celerity_get_resource_uri('/rsrc/image/phortune/balanced.png');
+ return 'Balanced';
}
public function getPaymentMethodProviderDescription() {
diff --git a/src/applications/phortune/provider/PhortunePayPalPaymentProvider.php b/src/applications/phortune/provider/PhortunePayPalPaymentProvider.php
--- a/src/applications/phortune/provider/PhortunePayPalPaymentProvider.php
+++ b/src/applications/phortune/provider/PhortunePayPalPaymentProvider.php
@@ -148,7 +148,7 @@
}
public function getPaymentMethodIcon() {
- return celerity_get_resource_uri('rsrc/image/phortune/paypal.png');
+ return 'PayPal';
}
public function getPaymentMethodProviderDescription() {
diff --git a/src/applications/phortune/provider/PhortunePaymentProvider.php b/src/applications/phortune/provider/PhortunePaymentProvider.php
--- a/src/applications/phortune/provider/PhortunePaymentProvider.php
+++ b/src/applications/phortune/provider/PhortunePaymentProvider.php
@@ -212,13 +212,12 @@
require_celerity_resource('phortune-css');
- $icon_uri = $this->getPaymentMethodIcon();
$description = $this->getPaymentMethodProviderDescription();
$details = $this->getPaymentMethodDescription();
$icon = id(new PHUIIconView())
- ->setImage($icon_uri)
- ->addClass('phortune-payment-icon');
+ ->setSpriteSheet(PHUIIconView::SPRITE_LOGIN)
+ ->setSpriteIcon($this->getPaymentMethodIcon());
$button = id(new PHUIButtonView())
->setSize(PHUIButtonView::BIG)
diff --git a/src/applications/phortune/provider/PhortuneStripePaymentProvider.php b/src/applications/phortune/provider/PhortuneStripePaymentProvider.php
--- a/src/applications/phortune/provider/PhortuneStripePaymentProvider.php
+++ b/src/applications/phortune/provider/PhortuneStripePaymentProvider.php
@@ -29,7 +29,7 @@
}
public function getPaymentMethodIcon() {
- return celerity_get_resource_uri('/rsrc/image/phortune/stripe.png');
+ return 'Stripe';
}
public function getPaymentMethodProviderDescription() {
diff --git a/src/applications/phortune/provider/PhortuneTestPaymentProvider.php b/src/applications/phortune/provider/PhortuneTestPaymentProvider.php
--- a/src/applications/phortune/provider/PhortuneTestPaymentProvider.php
+++ b/src/applications/phortune/provider/PhortuneTestPaymentProvider.php
@@ -34,7 +34,7 @@
}
public function getPaymentMethodIcon() {
- return celerity_get_resource_uri('/rsrc/image/phortune/test.png');
+ return 'TestPayment';
}
public function getPaymentMethodProviderDescription() {
diff --git a/src/applications/phortune/provider/PhortuneWePayPaymentProvider.php b/src/applications/phortune/provider/PhortuneWePayPaymentProvider.php
--- a/src/applications/phortune/provider/PhortuneWePayPaymentProvider.php
+++ b/src/applications/phortune/provider/PhortuneWePayPaymentProvider.php
@@ -148,7 +148,7 @@
}
public function getPaymentMethodIcon() {
- return celerity_get_resource_uri('/rsrc/image/phortune/wepay.png');
+ return 'WePay';
}
public function getPaymentMethodProviderDescription() {
diff --git a/webroot/rsrc/image/phortune/balanced.png b/webroot/rsrc/image/phortune/balanced.png
deleted file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/webroot/rsrc/image/phortune/paypal.png b/webroot/rsrc/image/phortune/paypal.png
deleted file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/webroot/rsrc/image/phortune/stripe.png b/webroot/rsrc/image/phortune/stripe.png
deleted file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/webroot/rsrc/image/phortune/test.png b/webroot/rsrc/image/phortune/test.png
deleted file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/webroot/rsrc/image/phortune/wepay.png b/webroot/rsrc/image/phortune/wepay.png
deleted file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 11:28 AM (6 d, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706938
Default Alt Text
D10654.id25592.diff (9 KB)

Event Timeline