Commit 498afae1 authored by Moe Ahmadi's avatar Moe Ahmadi Committed by Commit Bot

Reland: [Payments] Modernize test JavaScript

Original patch: https://crrev.com/c/962928
Reverted in: https://crrev.com/c/965022
Reason for revert: Broke iOS build.
Reason for reland: Fixed iOS test expectation.

TBR: anthonyvd@chromium.org
Bug: NONE
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ia9c4b3f21c7c8682a07e6c3675f2a754350c1fe1
Reviewed-on: https://chromium-review.googlesource.com/966783
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543858}
parent f4404931
......@@ -67,10 +67,10 @@ public class PaymentRequestContactDetailsAndFreeShippingTest implements MainActi
R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask());
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(
new String[] {"Jon Doe", "jon.doe@google.com", "+15555555555", "Jon Doe",
"4111111111111111", "12", "2050", "visa", "123", "Google", "340 Main St",
"CA", "Los Angeles", "90291", "US", "en", "freeShippingOption"});
mPaymentRequestTestRule.expectResultContains(new String[] {"Jon Doe", "jon.doe@google.com",
"+15555555555", "Jon Doe", "4111111111111111", "12", "2050", "basic-card", "123",
"Google", "340 Main St", "CA", "Los Angeles", "90291", "US", "en",
"freeShippingOption"});
}
/**
......@@ -91,10 +91,10 @@ public class PaymentRequestContactDetailsAndFreeShippingTest implements MainActi
R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask());
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(
new String[] {"Jon Doe", "jon.doe@google.com", "+15555555555", "Jon Doe",
"4111111111111111", "12", "2050", "visa", "123", "Google", "340 Main St",
"CA", "Los Angeles", "90291", "US", "en", "freeShippingOption"});
mPaymentRequestTestRule.expectResultContains(new String[] {"Jon Doe", "jon.doe@google.com",
"+15555555555", "Jon Doe", "4111111111111111", "12", "2050", "basic-card", "123",
"Google", "340 Main St", "CA", "Los Angeles", "90291", "US", "en",
"freeShippingOption"});
int expectedSample = Event.SHOWN | Event.PAY_CLICKED | Event.RECEIVED_INSTRUMENT_DETAILS
| Event.COMPLETED | Event.HAD_INITIAL_FORM_OF_PAYMENT
......
......@@ -85,8 +85,8 @@ public class PaymentRequestDynamicShippingSingleAddressTest implements MainActiv
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(new String[] {"Jon Doe", "4111111111111111",
"12", "2050", "visa", "123", "Google", "340 Main St", "CA", "Los Angeles", "90291",
"+16502530000", "US", "en", "californiaShippingOption"});
"12", "2050", "basic-card", "123", "Google", "340 Main St", "CA", "Los Angeles",
"90291", "+16502530000", "US", "en", "californiaShippingOption"});
}
/** Expand the shipping address section, select an address, edit it and click "Pay." */
......@@ -119,8 +119,8 @@ public class PaymentRequestDynamicShippingSingleAddressTest implements MainActiv
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(new String[] {"Jane Doe", "4111111111111111",
"12", "2050", "visa", "123", "Google", "340 Main St", "CA", "Los Angeles", "90291",
"+16502530000", "US", "en", "californiaShippingOption"});
"12", "2050", "basic-card", "123", "Google", "340 Main St", "CA", "Los Angeles",
"90291", "+16502530000", "US", "en", "californiaShippingOption"});
}
/** Expand the shipping address section, select address, edit but cancel editing, and "Pay". */
......@@ -154,8 +154,8 @@ public class PaymentRequestDynamicShippingSingleAddressTest implements MainActiv
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(new String[] {"Jon Doe", "4111111111111111",
"12", "2050", "visa", "123", "Google", "340 Main St", "CA", "Los Angeles", "90291",
"+16502530000", "US", "en", "californiaShippingOption"});
"12", "2050", "basic-card", "123", "Google", "340 Main St", "CA", "Los Angeles",
"90291", "+16502530000", "US", "en", "californiaShippingOption"});
}
/** Attempt to add an invalid address and cancel the transaction. */
......
......@@ -64,8 +64,8 @@ public class PaymentRequestEmailAndFreeShippingTest implements MainActivityStart
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(new String[] {"jon.doe@google.com", "Jon Doe",
"4111111111111111", "12", "2050", "visa", "123", "Google", "340 Main St", "CA",
"Los Angeles", "90291", "US", "en", "freeShippingOption"});
"4111111111111111", "12", "2050", "basic-card", "123", "Google", "340 Main St",
"CA", "Los Angeles", "90291", "US", "en", "freeShippingOption"});
}
/**
......
......@@ -73,8 +73,8 @@ public class PaymentRequestExpiredLocalCardTest implements MainActivityStartCall
new String[] {"11", "26", "123"}, mRule.getReadyToUnmask());
mRule.clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mRule.getDismissed());
mRule.expectResultContains(new String[] {"Jon Doe", "4111111111111111", "11", "2026",
"visa", "123", "Google", "340 Main St", "CA", "Los Angeles", "90291", "US", "en",
"freeShippingOption"});
"basic-card", "123", "Google", "340 Main St", "CA", "Los Angeles", "90291", "US",
"en", "freeShippingOption"});
}
/**
......
......@@ -64,7 +64,7 @@ public class PaymentRequestExtraShippingOptionsTest implements MainActivityStart
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(
new String[] {"Jon Doe", "4111111111111111", "12", "2050", "visa", "123", "Google",
"340 Main St", "CA", "Los Angeles", "90291", "US", "en"});
new String[] {"Jon Doe", "4111111111111111", "12", "2050", "basic-card", "123",
"Google", "340 Main St", "CA", "Los Angeles", "90291", "US", "en"});
}
}
......@@ -72,8 +72,8 @@ public class PaymentRequestFreeShippingTest implements MainActivityStartCallback
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(new String[] {"Jon Doe", "4111111111111111",
"12", "2050", "visa", "123", "Google", "340 Main St", "CA", "Los Angeles", "90291",
"US", "en", "freeShippingOption"});
"12", "2050", "basic-card", "123", "Google", "340 Main St", "CA", "Los Angeles",
"90291", "US", "en", "freeShippingOption"});
}
/** Attempt to add an invalid address and cancel the transaction. */
......
......@@ -64,8 +64,8 @@ public class PaymentRequestNameAndFreeShippingTest implements MainActivityStartC
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(new String[] {"Jon Doe", "Jon Doe",
"4111111111111111", "12", "2050", "visa", "123", "Google", "340 Main St", "CA",
"Los Angeles", "90291", "US", "en", "freeShippingOption"});
"4111111111111111", "12", "2050", "basic-card", "123", "Google", "340 Main St",
"CA", "Los Angeles", "90291", "US", "en", "freeShippingOption"});
}
/**
......
......@@ -109,7 +109,7 @@ public class PaymentRequestNoShippingTest implements MainActivityStartCallback {
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(
new String[] {"Jon Doe", "4111111111111111", "12", "2050", "visa", "123"});
new String[] {"Jon Doe", "4111111111111111", "12", "2050", "basic-card", "123"});
}
/** Click [PAY], type in "123" into the CVC dialog, then submit the payment. */
......@@ -130,7 +130,7 @@ public class PaymentRequestNoShippingTest implements MainActivityStartCallback {
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(
new String[] {"Jon Doe", "4111111111111111", "12", "2050", "visa", "123"});
new String[] {"Jon Doe", "4111111111111111", "12", "2050", "basic-card", "123"});
}
/** Attempt to add an invalid credit card number and cancel payment. */
......
......@@ -187,8 +187,8 @@ public class PaymentRequestPaymentAppAndCardsTest implements MainActivityStartCa
R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyToUnmask());
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(
new String[] {"Jon Doe", "4111111111111111", "12", "2050", "visa", "123"});
mPaymentRequestTestRule.expectResultContains(new String[] {
"Jon Doe", "4111111111111111", "12", "2050", "basic-card", "123"});
}
}
}
......@@ -64,8 +64,8 @@ public class PaymentRequestPhoneAndFreeShippingTest implements MainActivityStart
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(new String[] {"+15555555555", "Jon Doe",
"4111111111111111", "12", "2050", "visa", "123", "Google", "340 Main St", "CA",
"Los Angeles", "90291", "US", "en", "freeShippingOption"});
"4111111111111111", "12", "2050", "basic-card", "123", "Google", "340 Main St",
"CA", "Los Angeles", "90291", "US", "en", "freeShippingOption"});
}
/**
......@@ -86,8 +86,8 @@ public class PaymentRequestPhoneAndFreeShippingTest implements MainActivityStart
mPaymentRequestTestRule.clickCardUnmaskButtonAndWait(
DialogInterface.BUTTON_POSITIVE, mPaymentRequestTestRule.getDismissed());
mPaymentRequestTestRule.expectResultContains(new String[] {"+15555555555", "Jon Doe",
"4111111111111111", "12", "2050", "visa", "123", "Google", "340 Main St", "CA",
"Los Angeles", "90291", "US", "en", "freeShippingOption"});
"4111111111111111", "12", "2050", "basic-card", "123", "Google", "340 Main St",
"CA", "Los Angeles", "90291", "US", "en", "freeShippingOption"});
int expectedSample = Event.SHOWN | Event.PAY_CLICKED | Event.RECEIVED_INSTRUMENT_DETAILS
| Event.COMPLETED | Event.HAD_INITIAL_FORM_OF_PAYMENT
......
......@@ -14,7 +14,7 @@ var request;
function buy() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{supportedMethods: ['visa']}],
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request.show().catch(function(error) {
print(error);
......
......@@ -13,15 +13,14 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{
supportedMethods: [
'https://alicepay.com',
'https://bobpay.com',
'https://charliepay.com',
'visa',
'mastercard',
],
}],
[
{supportedMethods: 'https://alicepay.com'},
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'https://charliepay.com'}, {
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa', 'mastercard']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.show()
.then(function(resp) {
......
......@@ -8,7 +8,7 @@
function buy() { // eslint-disable-line no-unused-vars
var spoof = function() {
var payload =
'PGh0bWw+PGhlYWQ+PG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0yLCBtYXhpbXVtLXNjYWxlPTIiPjwvaGVhZD48Ym9keT48ZGl2IGlkPSJyZXN1bHQiPjwvZGl2PjxzY3JpcHQ+dHJ5IHsgIG5ldyBQYXltZW50UmVxdWVzdChbe3N1cHBvcnRlZE1ldGhvZHM6IFsiYmFzaWMtY2FyZCJdfV0sICAgIHt0b3RhbDoge2xhYmVsOiAiVCIsIGFtb3VudDoge2N1cnJlbmN5OiAiVVNEIiwgdmFsdWU6ICIxLjAwIn19fSkgIC5zaG93KCkgIC50aGVuKGZ1bmN0aW9uKGluc3RydW1lbnRSZXNwb25zZSkgeyAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgicmVzdWx0IikuaW5uZXJIVE1MID0gIlJlc29sdmVkIjsgIH0pLmNhdGNoKGZ1bmN0aW9uKGUpIHsgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInJlc3VsdCIpLmlubmVySFRNTCA9ICJSZWplY3RlZDogIiArIGU7ICB9KTt9IGNhdGNoKGUpIHsgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJyZXN1bHQiKS5pbm5lckhUTUwgPSAiRXhjZXB0aW9uOiAiICsgZTt9PC9zY3JpcHQ+PC9ib2R5PjwvaHRtbD4='; // eslint-disable-line max-len
'PGh0bWw+PGhlYWQ+PG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0yLCBtYXhpbXVtLXNjYWxlPTIiPjwvaGVhZD48Ym9keT48ZGl2IGlkPSJyZXN1bHQiPjwvZGl2PjxzY3JpcHQ+dHJ5IHsgIG5ldyBQYXltZW50UmVxdWVzdChbe3N1cHBvcnRlZE1ldGhvZHM6ICJiYXNpYy1jYXJkIn1dLCAgICB7dG90YWw6IHtsYWJlbDogIlQiLCBhbW91bnQ6IHtjdXJyZW5jeTogIlVTRCIsIHZhbHVlOiAiMS4wMCJ9fX0pICAuc2hvdygpICAudGhlbihmdW5jdGlvbihpbnN0cnVtZW50UmVzcG9uc2UpIHsgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInJlc3VsdCIpLmlubmVySFRNTCA9ICJSZXNvbHZlZCI7ICB9KS5jYXRjaChmdW5jdGlvbihlKSB7ICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJyZXN1bHQiKS5pbm5lckhUTUwgPSAiUmVqZWN0ZWQ6ICIgKyBlOyAgfSk7fSBjYXRjaChlKSB7ICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgicmVzdWx0IikuaW5uZXJIVE1MID0gIkV4Y2VwdGlvbjogIiArIGU7fTwvc2NyaXB0PjwvYm9keT48L2h0bWw+'; // eslint-disable-line max-len
document.write(atob(payload));
};
window.location.href =
......
......@@ -13,7 +13,10 @@
*/
function buildPaymentRequest() {
return new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'https://alicepay.com']}],
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'https://alicepay.com'},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
}
......
......@@ -13,10 +13,14 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'basic-card']}], {
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'basic-card'},
],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
modifiers: [{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
total: {
label: 'Total',
amount: {currency: 'USD', value: '4.00'},
......@@ -53,10 +57,14 @@ function buy() { // eslint-disable-line no-unused-vars
function buyWithBobPayDiscount() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'basic-card']}], {
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'basic-card'},
],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
modifiers: [{
supportedMethods: ['https://bobpay.com'],
supportedMethods: 'https://bobpay.com',
total: {
label: 'Total',
amount: {currency: 'USD', value: '4.00'},
......@@ -93,10 +101,14 @@ function buyWithBobPayDiscount() { // eslint-disable-line no-unused-vars
function creditSupportedType() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'basic-card']}], {
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'basic-card'},
],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
modifiers: [{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
total: {
label: 'Total',
amount: {currency: 'USD', value: '4.00'},
......@@ -136,10 +148,14 @@ function creditSupportedType() { // eslint-disable-line no-unused-vars
function debitSupportedType() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'basic-card']}], {
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'basic-card'},
],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
modifiers: [{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
total: {
label: 'Total',
amount: {currency: 'USD', value: '4.00'},
......@@ -179,10 +195,14 @@ function debitSupportedType() { // eslint-disable-line no-unused-vars
function visaSupportedNetwork() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'basic-card']}], {
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'basic-card'},
],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
modifiers: [{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
total: {
label: 'Total',
amount: {currency: 'USD', value: '4.00'},
......@@ -224,10 +244,14 @@ function visaSupportedNetwork() { // eslint-disable-line no-unused-vars
function mastercardSupportedNetwork() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'basic-card']}], {
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'basic-card'},
],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
modifiers: [{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
total: {
label: 'Total',
amount: {currency: 'USD', value: '4.00'},
......@@ -268,10 +292,14 @@ function mastercardSupportedNetwork() { // eslint-disable-line no-unused-vars
function mastercardAnySupportedType() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'basic-card']}], {
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'basic-card'},
],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
modifiers: [{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
total: {
label: 'Total',
amount: {currency: 'USD', value: '4.00'},
......@@ -315,7 +343,7 @@ function noTotal() { // eslint-disable-line no-unused-vars
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
modifiers: [
{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
data: {
mastercardProgramParticipantId: '86328764873265',
supportedNetworks: ['mastercard'],
......
......@@ -13,7 +13,13 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa', 'mastercard']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa', 'mastercard']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.show()
.then(function(resp) {
......
......@@ -17,7 +17,7 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com']}],
[{supportedMethods: 'https://bobpay.com'}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.show()
.then(function(resp) {
......@@ -46,7 +46,7 @@ function buy() { // eslint-disable-line no-unused-vars
function buyWithRequestedEmail() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com']}],
[{supportedMethods: 'https://bobpay.com'}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}},
{requestPayerEmail: true})
.show()
......
......@@ -11,7 +11,7 @@
*/
function initPaymentRequest() {
var supportedInstruments = [{
supportedMethods: ['https://bobpay.com'],
supportedMethods: 'https://bobpay.com',
}];
var details = {
......
......@@ -15,7 +15,13 @@ var request;
function noQueryShow() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request.show()
.then(function(resp) {
......@@ -41,7 +47,13 @@ function noQueryShow() { // eslint-disable-line no-unused-vars
function queryShow() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request.canMakePayment()
.then(function(result) {
......@@ -75,7 +87,13 @@ function queryShow() { // eslint-disable-line no-unused-vars
function queryNoShow() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request.canMakePayment()
.then(function(result) {
......
......@@ -13,7 +13,13 @@
function buy() { // eslint-disable-line no-unused-vars
try {
var request = new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request.canMakePayment()
.then(function(result) {
......
......@@ -43,7 +43,7 @@ function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com']}],
[{supportedMethods: 'https://bobpay.com'}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.canMakePayment()
.then(function(result) {
......@@ -58,7 +58,7 @@ function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com']}],
[{supportedMethods: 'https://bobpay.com'}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.canMakePayment()
.then(function(result) {
......@@ -81,7 +81,7 @@ function otherBuy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com']}],
[{supportedMethods: 'https://bobpay.com'}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.canMakePayment()
.then(function(result) {
......@@ -96,7 +96,7 @@ function otherBuy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://alicepay.com']}],
[{supportedMethods: 'https://alicepay.com'}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.canMakePayment()
.then(function(result) {
......
......@@ -10,7 +10,7 @@
function buy() { // eslint-disable-line no-unused-vars
try {
var request = new PaymentRequest(
[{supportedMethods: ['visa']}],
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request.canMakePayment()
.then(function(result) {
......@@ -30,7 +30,10 @@ function buy() { // eslint-disable-line no-unused-vars
function other_buy() { // eslint-disable-line no-unused-vars, camelcase
try {
var request = new PaymentRequest(
[{supportedMethods: ['mastercard']}],
[{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['mastercard']},
}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request.canMakePayment()
.then(function(result) {
......
......@@ -12,7 +12,13 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'amex', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['amex', 'visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}, {
requestPayerName: true,
requestPayerEmail: true,
......
......@@ -22,7 +22,14 @@ function buy() { // eslint-disable-line no-unused-vars
}],
};
var request = new PaymentRequest(
[{supportedMethods: ['visa', 'https://bobpay.com']}], details, {
[
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
{supportedMethods: 'https://bobpay.com'},
],
details, {
requestPayerName: true,
requestPayerEmail: true,
requestPayerPhone: true,
......
......@@ -12,7 +12,7 @@
function buildPaymentRequest() {
return new PaymentRequest(
[{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
data: {
supportedTypes: ['debit'],
},
......
......@@ -25,7 +25,8 @@ function buy() { // eslint-disable-line no-unused-vars
};
var request = new PaymentRequest(
[{supportedMethods: ['visa']}], details, {requestShipping: true});
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
details, {requestShipping: true});
request.addEventListener('shippingaddresschange', function(evt) {
evt.updateWith(new Promise(function(resolve) {
......
......@@ -12,7 +12,13 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}},
{requestPayerEmail: true})
.show()
......
......@@ -22,8 +22,8 @@ function buy() { // eslint-disable-line no-unused-vars
}],
};
var request = new PaymentRequest(
[{supportedMethods: ['visa']}], details,
{requestPayerEmail: true, requestShipping: true});
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
details, {requestPayerEmail: true, requestShipping: true});
request.addEventListener('shippingaddresschange', function(e) {
e.updateWith(details);
});
......
......@@ -12,7 +12,13 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}},
{requestPayerEmail: true, requestPayerPhone: true})
.show()
......
......@@ -23,7 +23,7 @@ function buy() { // eslint-disable-line no-unused-vars
};
var request = new PaymentRequest(
[{supportedMethods: ['basic-card']}], details, {requestShipping: true});
[{supportedMethods: 'basic-card'}], details, {requestShipping: true});
request.addEventListener('shippingaddresschange', function(evt) {
evt.updateWith({});
......
......@@ -22,7 +22,9 @@ function buy() { // eslint-disable-line no-unused-vars
selected: true,
}],
};
var request = new PaymentRequest([{supportedMethods: ['visa']}], details);
var request = new PaymentRequest(
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
details);
request.show()
.then(function(resp) {
resp.complete('success')
......
......@@ -12,7 +12,7 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['visa']}],
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
.show()
.then(function(resp) {
......
......@@ -23,16 +23,19 @@ function buy() { // eslint-disable-line no-unused-vars
};
var request = new PaymentRequest(
[{
supportedMethods: [
'visa',
'unionpay',
'mir',
'mastercard',
'jcb',
'discover',
'diners',
'amex',
],
supportedMethods: 'basic-card',
data: {
supportedNetworks: [
'visa',
'unionpay',
'mir',
'mastercard',
'jcb',
'discover',
'diners',
'amex',
],
},
}],
details, {requestShipping: true});
request.addEventListener('shippingaddresschange', function(e) {
......
......@@ -12,7 +12,10 @@
* @const
*/
var REQUEST = new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{supportedMethods: 'basic-card', data: {supportedMethods: ['visa']}},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
/**
......
......@@ -6,7 +6,7 @@
/** Invokes PaymentRequest with a very long request identifier. */
function buy() { // eslint-disable-line no-unused-vars
var foo = Object.freeze({supportedMethods: ['basic-card']});
var foo = Object.freeze({supportedMethods: 'basic-card'});
var defaultMethods = Object.freeze([foo]);
var defaultDetails = Object.freeze({
total: {
......
......@@ -33,7 +33,8 @@ function ccBuy() { // eslint-disable-line no-unused-vars
};
request = new PaymentRequest(
[{
supportedMethods: ['visa'],
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
}],
{
total: {
......@@ -84,7 +85,7 @@ function androidPayBuy() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{
supportedMethods: ['https://android.com/pay'],
supportedMethods: 'https://android.com/pay',
}],
{
total: {
......@@ -130,7 +131,7 @@ function androidPaySkipUiBuy() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{
supportedMethods: ['https://android.com/pay'],
supportedMethods: 'https://android.com/pay',
}],
{
total: {
......@@ -164,7 +165,7 @@ function noSupported() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{
supportedMethods: ['https://randompay.com'],
supportedMethods: 'https://randompay.com',
}],
{
total: {
......@@ -208,9 +209,12 @@ function noSupported() { // eslint-disable-line no-unused-vars
function cardsAndBobPayBuy() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{
supportedMethods: ['visa', 'https://bobpay.com'],
}],
[
{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}},
{
supportedMethods: 'https://bobpay.com',
},
],
{
total: {
label: 'Total',
......@@ -236,8 +240,9 @@ function cardsAndBobPayBuy() { // eslint-disable-line no-unused-vars
.then(function(resp) {
resp.complete('success')
.then(function() {
print(resp.methodName + '<br>' +
JSON.stringify(resp.details, undefined, 2));
print(
resp.methodName + '<br>' +
JSON.stringify(resp.details, undefined, 2));
})
.catch(function(error) {
print(error.message);
......@@ -257,10 +262,18 @@ function cardsAndBobPayBuy() { // eslint-disable-line no-unused-vars
function contactInfoBuy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'amex', 'visa']}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}},
{requestPayerName: true, requestPayerEmail: true,
requestPayerPhone: true})
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['amex', 'visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}, {
requestPayerName: true,
requestPayerEmail: true,
requestPayerPhone: true,
})
.show()
.then(function(resp) {
resp.complete('success')
......
......@@ -12,7 +12,7 @@ function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{
supportedMethods: ['foo'],
supportedMethods: 'foo',
}],
{
total: {
......@@ -23,7 +23,7 @@ function buy() { // eslint-disable-line no-unused-vars
},
},
modifiers: [{
supportedMethods: ['foo'],
supportedMethods: 'foo',
}],
})
.show()
......
......@@ -15,7 +15,13 @@ var request2;
function buy() { // eslint-disable-line no-unused-vars
try {
request = new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request.show()
.then(function(resp) {
......@@ -64,7 +70,13 @@ function showAgain() { // eslint-disable-line no-unused-vars
function showSecondRequest() { // eslint-disable-line no-unused-vars
try {
request2 = new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
request2.show()
.then(function(resp) {
......
......@@ -12,7 +12,7 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['visa']}],
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}},
{requestPayerName: true})
.show()
......
......@@ -13,7 +13,8 @@
function buy() { // eslint-disable-line no-unused-vars
try {
var request = new PaymentRequest(
[{supportedMethods: ['visa']}], {
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
shippingOptions: [{
id: 'freeShippingOption',
......
......@@ -11,17 +11,22 @@
*/
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest([{supportedMethods: ['visa', 'mastercard']}], {
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
displayItems: [
new PaymentRequest(
[{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa', 'mastercard']},
}],
{
label: 'Subtotal',
amount: {currency: 'USD', value: '4.50'},
pending: true,
},
{label: 'Taxes', amount: {currency: 'USD', value: '0.50'}},
],
})
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
displayItems: [
{
label: 'Subtotal',
amount: {currency: 'USD', value: '4.50'},
pending: true,
},
{label: 'Taxes', amount: {currency: 'USD', value: '0.50'}},
],
})
.show()
.then(function(resp) {
resp.complete('success')
......
......@@ -38,7 +38,7 @@ function canMakePaymentHelper(methodData) {
*/
function checkBasicCard() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
}]);
}
......@@ -47,7 +47,7 @@ function checkBasicCard() { // eslint-disable-line no-unused-vars
*/
function checkBasicDebit() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
data: {
supportedTypes: ['debit'],
},
......@@ -60,7 +60,7 @@ function checkBasicDebit() { // eslint-disable-line no-unused-vars
*/
function checkBasicMasterCard() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
data: {
supportedNetworks: ['mastercard'],
},
......@@ -73,7 +73,7 @@ function checkBasicMasterCard() { // eslint-disable-line no-unused-vars
*/
function checkBasicVisa() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
data: {
supportedNetworks: ['visa'],
},
......@@ -85,7 +85,7 @@ function checkBasicVisa() { // eslint-disable-line no-unused-vars
*/
function checkMasterCard() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['mastercard'],
supportedMethods: 'mastercard',
}]);
}
......@@ -94,7 +94,7 @@ function checkMasterCard() { // eslint-disable-line no-unused-vars
*/
function checkVisa() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['visa'],
supportedMethods: 'visa',
}]);
}
......@@ -103,7 +103,7 @@ function checkVisa() { // eslint-disable-line no-unused-vars
*/
function checkAlicePay() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['https://alicepay.com/webpay'],
supportedMethods: 'https://alicepay.com/webpay',
}]);
}
......@@ -112,7 +112,7 @@ function checkAlicePay() { // eslint-disable-line no-unused-vars
*/
function checkBobPay() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['https://bobpay.com/webpay'],
supportedMethods: 'https://bobpay.com/webpay',
}]);
}
......@@ -121,11 +121,14 @@ function checkBobPay() { // eslint-disable-line no-unused-vars
* "basic-card".
*/
function checkBobPayAndBasicCard() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['https://bobpay.com/webpay'],
}, {
supportedMethods: ['basic-card'],
}]);
canMakePaymentHelper([
{
supportedMethods: 'https://bobpay.com/webpay',
},
{
supportedMethods: 'basic-card',
},
]);
}
/**
......@@ -133,11 +136,14 @@ function checkBobPayAndBasicCard() { // eslint-disable-line no-unused-vars
* "visa".
*/
function checkBobPayAndVisa() { // eslint-disable-line no-unused-vars
canMakePaymentHelper([{
supportedMethods: ['https://bobpay.com/webpay'],
}, {
supportedMethods: ['visa'],
}]);
canMakePaymentHelper([
{
supportedMethods: 'https://bobpay.com/webpay',
},
{
supportedMethods: 'visa',
},
]);
}
/**
......@@ -181,10 +187,10 @@ function buyHelper(methodData) {
function buy() { // eslint-disable-line no-unused-vars
buyHelper([
{
supportedMethods: ['mastercard'],
supportedMethods: 'mastercard',
},
{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
data: {
supportedNetworks: ['visa'],
},
......@@ -197,23 +203,7 @@ function buy() { // eslint-disable-line no-unused-vars
*/
function buyBasicCard() { // eslint-disable-line no-unused-vars
buyHelper([{
supportedMethods: ['basic-card'],
data: {
supportedTypes: ['debit'],
},
}]);
}
/**
* Merchant requests payment via "basic-card" with "debit" as the supported card
* type.
*/
function buyBasicDebit() { // eslint-disable-line no-unused-vars
buyHelper([{
supportedMethods: ['basic-card'],
data: {
supportedTypes: ['debit'],
},
supportedMethods: 'basic-card',
}]);
}
......@@ -223,7 +213,7 @@ function buyBasicDebit() { // eslint-disable-line no-unused-vars
*/
function buyBasicDebit() { // eslint-disable-line no-unused-vars
buyHelper([{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
data: {
supportedTypes: ['debit'],
},
......@@ -236,7 +226,7 @@ function buyBasicDebit() { // eslint-disable-line no-unused-vars
*/
function buyBasicMasterCard() { // eslint-disable-line no-unused-vars
buyHelper([{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
data: {
supportedNetworks: ['mastercard'],
},
......
......@@ -37,7 +37,7 @@ function updateDetails(details, shippingOption) {
function onBuyClicked() { // eslint-disable-line no-unused-vars
var supportedInstruments = [
{
supportedMethods: ['https://android.com/pay'],
supportedMethods: 'https://android.com/pay',
data: {
merchantName: 'Rouslan Solomakhin',
merchantId: '00184145120947117657',
......@@ -53,7 +53,7 @@ function onBuyClicked() { // eslint-disable-line no-unused-vars
},
},
{
supportedMethods: ['basic-card'],
supportedMethods: 'basic-card',
},
];
......
......@@ -10,10 +10,12 @@
*/
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest([{supportedMethods: ['visa']}], {
id: 'my_payment_id',
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
})
new PaymentRequest(
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{
id: 'my_payment_id',
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
})
.show()
.then(function(resp) {
resp.complete('success')
......
<!DOCTYPE html>
<script>
new PaymentRequest(
[{supportedMethods: ["basic-card"]}],
{total: {label: "Tots", amount: {currency: "USD", value: "1.00"}}}).show();
[{supportedMethods: 'basic-card'}],
{total: {label: 'Tots', amount: {currency: 'USD', value: '1.00'}}}).show();
</script>
......@@ -3,7 +3,7 @@
all_requests = [];
for (var i = 0; i < 5; i++) {
all_requests.push(new PaymentRequest(
[{supportedMethods: ["visa"]}],
{total: {label: "Total!", amount: {currency: "USD", value: "1.00"}}}));
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{total: {label: 'Total!', amount: {currency: 'USD', value: '1.00'}}}));
}
</script>
......@@ -12,7 +12,13 @@
function buy() { // eslint-disable-line no-unused-vars
try {
new PaymentRequest(
[{supportedMethods: ['https://bobpay.com', 'visa']}],
[
{supportedMethods: 'https://bobpay.com'},
{
supportedMethods: 'basic-card',
data: {supportedNetworks: ['visa']},
},
],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}},
{requestPayerPhone: true})
.show()
......
......@@ -13,7 +13,8 @@
function buy() { // eslint-disable-line no-unused-vars
try {
var request = new PaymentRequest(
[{supportedMethods: ['visa']}], {
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{
total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}},
shippingOptions: [{
id: 'freeShippingOption',
......
......@@ -23,7 +23,8 @@ function buy() { // eslint-disable-line no-unused-vars
};
var request = new PaymentRequest(
[{supportedMethods: ['visa']}], details, {requestShipping: true});
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
details, {requestShipping: true});
request.addEventListener('shippingaddresschange', function(evt) {
evt.updateWith(new Promise(function(resolve) {
......
......@@ -9,10 +9,10 @@
*/
function buy() { // eslint-disable-line no-unused-vars
var payment1 = new PaymentRequest(
[{supportedMethods: ['visa']}],
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
var payment2 = new PaymentRequest(
[{supportedMethods: ['visa']}],
[{supportedMethods: 'basic-card', data: {supportedNetworks: ['visa']}}],
{total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}});
payment1.show();
payment2.show().catch(function(error) {
......
......@@ -399,7 +399,7 @@ PaymentRequest::CreateAndAddAutofillPaymentInstrument(
// the name of the network directly.
std::string method_name = basic_card_issuer_network;
if (basic_card_specified_networks_.count(basic_card_issuer_network)) {
method_name = "basic_card";
method_name = "basic-card";
}
// The total number of card types: credit, debit, prepaid, unknown.
......
......@@ -85,7 +85,7 @@ const char kRequestEmailPage[] =
performAction:grey_tap()];
// Test that the card details were sent to the merchant.
[self waitForWebViewContainingTexts:{"\"methodName\": \"visa\"",
[self waitForWebViewContainingTexts:{"\"methodName\": \"basic-card\"",
"\"details\": {",
"\"cardNumber\": \"4111111111111111\"",
"\"cardSecurityCode\": \"123\"",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment