You are here

public static function Braintree_WebhookNotification::parse in Commerce Braintree 7

4 calls to Braintree_WebhookNotification::parse()
Braintree_WebhookNotificationTest::testParsingInvalidSignatureRaisesError in braintree_php/tests/unit/WebhookNotificationTest.php
Braintree_WebhookNotificationTest::testParsingModifiedSignatureRaisesError in braintree_php/tests/unit/WebhookNotificationTest.php
Braintree_WebhookNotificationTest::testParsingUnknownPublicKeyRaisesError in braintree_php/tests/unit/WebhookNotificationTest.php
Braintree_WebhookNotificationTest::testSampleNotificationReturnsAParsableNotification in braintree_php/tests/unit/WebhookNotificationTest.php

File

braintree_php/lib/Braintree/WebhookNotification.php, line 12

Class

Braintree_WebhookNotification

Code

public static function parse($signature, $payload) {
  self::_validateSignature($signature, $payload);
  $xml = base64_decode($payload);
  $attributes = Braintree_Xml::buildArrayFromXml($xml);
  return self::factory($attributes['notification']);
}