Index: third_party/WebKit/Source/modules/payments/PaymentResponse.cpp |
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp |
index a12d16cda5a8080a89390b742959eff349cfe920..d8fc8030edba1432bcae6370dd8365f2bde56963 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp |
@@ -45,9 +45,14 @@ ScriptValue PaymentResponse::details(ScriptState* scriptState, ExceptionState& e |
return ScriptValue(scriptState, fromJSONString(scriptState, m_stringifiedDetails, exceptionState)); |
} |
-ScriptPromise PaymentResponse::complete(ScriptState* scriptState, bool success) |
+ScriptPromise PaymentResponse::complete(ScriptState* scriptState, const String& result) |
{ |
- return m_paymentCompleter->complete(scriptState, success); |
+ PaymentComplete convertedResult = Unknown; |
+ if (result == "success") |
+ convertedResult = Success; |
+ if (result == "fail") |
+ convertedResult = Fail; |
+ return m_paymentCompleter->complete(scriptState, convertedResult); |
} |
DEFINE_TRACE(PaymentResponse) |