Add payment page link to Registrar Console

The payment page has also been updated to refuse to show itself if
the registrar is not set to credit card billing terms.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117983313
This commit is contained in:
jart 2016-03-23 16:49:56 -07:00 committed by Justine Tunney
parent b6b13333dd
commit 89fa3caaba
14 changed files with 73 additions and 12 deletions

View file

@ -189,9 +189,13 @@ registry.registrar.Payment.prototype.bindToDom = function(id) {
*/
registry.registrar.Payment.prototype.onSetup_ = function(response) {
if (response.status != 'SUCCESS') {
if (response.message == 'sandbox') { // XXX: Hard-coded from backend.
// Check for hard-coded error message codes from backend.
if (response.message == 'sandbox') {
goog.soy.renderElement(this.content_,
registry.soy.registrar.payment.sandbox);
} else if (response.message == 'not-using-cc-billing') {
goog.soy.renderElement(this.content_,
registry.soy.registrar.payment.notUsingCcBilling);
} else {
registry.forms.displayError(response.message);
}