나는 API 게이트웨이를 통해 나의 람다 기능을 Braintree의 Webhooks에 연결하는 방법에 대해 다소 혼란 스럽다. webhooks API를 통해 API를 통해 내 람다 함수를 호출하고 끝점 URL을 알고 있지만 내 람다 함수를 제대로 처리하고 웹 훅이 매개 변수로 함수를 호출 할 때 전달할 값을 사용하는 방법을 잘 모르겠습니다. 지금 당장 다음과 같은 메시지가 표시됩니다.webook 알림에서 AWS 람다 함수로 매개 변수를 가져 오는 방법은 무엇입니까?
package com.amazonaws.lambda.submerchantapproved;
import java.util.HashMap;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import com.amazonaws.services.lambda.runtime.events.DynamodbEvent;
import com.braintreegateway.BraintreeGateway;
import com.braintreegateway.Environment;
import com.braintreegateway.WebhookNotification;
import com.braintreegateway.WebhookNotification.Kind;
public class SubmerchantApproved implements RequestHandler<Object, String> {
public String handleRequest(Object request, Context context) {
BraintreeGateway gateway = new BraintreeGateway(
Environment.SANDBOX,
"MyValue",
"MyValue",
"MyValue"
);
WebhookNotification webhookNotification = gateway.webhookNotification().parse(
request.queryParams("bt_signature"),
request.queryParams("bt_payload")
);
String woofer = "";
return woofer;
}
}
이것은 제대로 작동하지 않습니다. 얼마나 정확하게 내 lambda 함수에 이러한 bt_signature 및 by_payload 값을 가져다 줍니까? 웹 훅은 관련있는 http-POST 요청을 통해 데이터를 전달합니다.
"* bt_signature 및 by_payload 값을 내 lambda 함수에 사용 하시겠습니까 ?? *" – hagrawal