API Integration with Stripe Webhooks Using Ngrok in Docker Environment

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/spiredigital-2017-master/wp-content/plugins/s3-uploads/lib/aws-sdk/GuzzleHttp/Handler/CurlFactory.php on line 67
Call Stack
#TimeMemoryFunctionLocation
10.46254076080{main}( ).../index.php:0
20.46264076360require( '/var/www/html/spiredigital-2017-master/wp-blog-header.php' ).../index.php:17
32.365317995552require_once( '/var/www/html/spiredigital-2017-master/wp-includes/template-loader.php' ).../wp-blog-header.php:19
42.380017953992include( '/var/www/html/spiredigital-2017-master/wp-content/themes/spire2017/index.php' ).../template-loader.php:106
52.891419944560get_template_part( ).../index.php:10
62.891419945048locate_template( ).../general-template.php:204
72.891419945160load_template( ).../template.php:676
82.891519945448require( '/var/www/html/spiredigital-2017-master/wp-content/themes/spire2017/templates/loop.php' ).../template.php:732
92.892819945448get_template_part( ).../loop.php:10
102.892819945936locate_template( ).../general-template.php:204
112.892919946064load_template( ).../template.php:676
122.892919946328require( '/var/www/html/spiredigital-2017-master/wp-content/themes/spire2017/templates/content.php' ).../template.php:732
132.900719947752get_template_part( ).../content.php:4
142.900719948248locate_template( ).../general-template.php:204
152.900719948376load_template( ).../template.php:676
162.900819948640require( '/var/www/html/spiredigital-2017-master/wp-content/themes/spire2017/templates/entry-meta.php' ).../template.php:732
172.900819948672get_field( ).../entry-meta.php:4
182.910519966592acf_format_value( ).../api-template.php:54
192.910619966592apply_filters( ).../acf-value-functions.php:139
202.910619966992WP_Hook->apply_filters( ).../plugin.php:212
212.910619967744_acf_apply_hook_variations( ).../class-wp-hook.php:292
222.910619968200apply_filters_ref_array( ).../acf-hook-functions.php:101
232.910619968200WP_Hook->apply_filters( ).../plugin.php:255
242.910619968952acf_field_image->format_value( ).../class-wp-hook.php:292
252.910719968952acf_get_attachment( ).../class-acf-field-image.php:337
262.919119983792file_exists ( ).../api-helpers.php:3154
272.919219984120S3_Uploads_Stream_Wrapper->url_stat( ).../api-helpers.php:3154
282.919319984712S3_Uploads_Stream_Wrapper->createStat( ).../class-s3-uploads-stream-wrapper.php:342
292.919319985872S3_Uploads_Stream_Wrapper->boolCall( ).../class-s3-uploads-stream-wrapper.php:397
302.919319985872S3_Uploads_Stream_Wrapper->{closure:/var/www/html/spiredigital-2017-master/wp-content/plugins/s3-uploads/inc/class-s3-uploads-stream-wrapper.php:371-397}( ).../class-s3-uploads-stream-wrapper.php:1006
312.919419985872Aws\S3\S3Client->headObject( ).../class-s3-uploads-stream-wrapper.php:373
322.919419986248Aws\S3\S3Client->__call( ).../class-s3-uploads-stream-wrapper.php:373
332.921119989352Aws\S3\S3Client->execute( ).../AwsClientTrait.php:78
342.930420099680GuzzleHttp\Promise\Promise->wait( ).../AwsClientTrait.php:59
352.930420099680GuzzleHttp\Promise\Promise->waitIfPending( ).../Promise.php:62
362.930420099680GuzzleHttp\Promise\Promise->invokeWaitList( ).../Promise.php:221
372.933920132208GuzzleHttp\Promise\Promise->waitIfPending( ).../Promise.php:265
382.933920132208GuzzleHttp\Promise\Promise->invokeWaitList( ).../Promise.php:221
392.933920132208GuzzleHttp\Promise\Promise->waitIfPending( ).../Promise.php:262
402.933920132208GuzzleHttp\Promise\Promise->invokeWaitFn( ).../Promise.php:219
412.933920132208GuzzleHttp\Handler\CurlMultiHandler->execute( ).../Promise.php:242
422.969620132208GuzzleHttp\Handler\CurlMultiHandler->tick( ).../CurlMultiHandler.php:123
432.997420140448GuzzleHttp\Handler\CurlMultiHandler->processMessages( ).../CurlMultiHandler.php:108
442.997420140936GuzzleHttp\Handler\CurlFactory::finish( ).../CurlMultiHandler.php:179
452.997420140936GuzzleHttp\Handler\CurlFactory->release( ).../CurlFactory.php:107
462.997420140936count ( ).../CurlFactory.php:67
software development
Erik Leon
Aug 8, 2019

DISCLAIMER: ngrok is a paid service. This blog post is not sponsored by or affiliated with ngrok in any way.  What are Stripe Webhooks? Recently, I worked on an agile development project that involved taking payments using Stripe. Not having worked with Stripe before, I imagined a fairly straightforward process of setting up API calls to Stripe to handle what we needed. Turns out, while that is part of the equation, Stripe also offers a powerful feature called webhooks. Webhooks are just a fancy name for API calls made from Stripe to your application. So now we have a two-way…

Magento 2: Create Model using “JOIN”ed SQL Query
software development
Erik Leon
Dec 20, 2018

TL;DR: In the ResourceModel of your entity, override the “_getLoadSelect” function to add “join” statements to the query Magento uses when it loads instances of that model. Similarly, override the “_initSelect” function in the ResourceModel Collection class of your entity. Introduction In general, it’s not good to duplicate data across multiple tables in a database. Any time two or more columns across tables refer to the same real-life business information, it’s easier to introduce bugs that allow the data to become inconsistent. However, there are often problems that require building models, which refer to data in other models stored in…

A Semi-Radical Argument for the VIM Text Editor
software development
Erik Leon
Oct 25, 2018

To many (perhaps to most), VIM is more a meme than a text editor. It has a reputation of being incredibly difficult to learn, with the simplest of tasks requiring arcane commands and combinations of keystrokes. The internet is replete with jokes about how difficult it is to do anything with VIM, including something as fundamental as closing the program. For those who choose to look past the reputation and try to learn to use VIM, the first thing they encounter is that it’s a command-line application. Command line? What is this, 1975? It seems archaic. They open the program…

We use cookies to personalize content and ads, to provide social media features and to analyze our traffic. We also share information about your use of our site with our social media, advertising and analytics partners. Read our cookie policy here

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close