Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhooks Testing Gives Errors #484

Closed
ParadiseStudios opened this issue Feb 17, 2018 · 2 comments
Closed

Webhooks Testing Gives Errors #484

ParadiseStudios opened this issue Feb 17, 2018 · 2 comments

Comments

@ParadiseStudios
Copy link

ParadiseStudios commented Feb 17, 2018

Assumes:
Omnipay is setup correctly.
Omnipay makes a successful transaction to Braintree.
MerchantID, PublicKey & PrivateKey are set correctly.

$sampleNotificationSignature = 'WITHHELD';
$sampleNotificationPayload = 'WITHHELD';
use Omnipay\Omnipay;
$gateway = Omnipay::create('Braintree');
$gateway->setPrivateKey('WITHHELD');
$gateway->setPublicKey('WITHHELD');
$gateway->setMerchantId('WITHHELD');
$gateway->setTestMode(TRUE);
$notification = $gateway->parseNotification([
    'bt_signature'  => $sampleNotificationSignature,
    'bt_payload'    => $sampleNotificationPayload
])->send();

When trying to test WebHooks from Braintree, POST from the test url results in the following errors...

Fatal error: Uncaught Braintree\Exception\Configuration: Braintree\Configuration::merchantId needs to be set (or accessToken needs to be passed to Braintree\Gateway). in /vendor/braintree/braintree_php/lib/Braintree/Configuration.php:254

Stack trace:
#0 /vendor/braintree/braintree_php/lib/Braintree/WebhookNotificationGateway.php(10): Braintree\Configuration->assertHasAccessTokenOrKeys()
#1 /vendor/braintree/braintree_php/lib/Braintree/Gateway.php(257): Braintree\WebhookNotificationGateway->__construct(Object(Braintree\Gateway))
#2 /vendor/braintree/braintree_php/lib/Braintree/WebhookNotification.php(35): Braintree\Gateway->webhookNotification()
#3 /vendor/omnipay/braintree/src/Gateway.php(281): Braintree\WebhookNotification::parse('DETAILS HIDDEN')
#4 braintree.php(27 in /vendor/braintree/braintree_php/lib/Braintree/Configuration.php on line 254

https://stackoverflow.com/questions/48843652/omnipay-braintree-webhooks-testing-gives-errors

@delatbabel
Copy link
Contributor

This issue looks like it's specific to the braintree gateway so should be raised in that gateway's repository. It doesn't look like a generic Omnipay error.

@ParadiseStudios
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants