File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ Instantiating the class will give you an object with available methods
8585
8686 - ` message ` : SMS content. ` REQUIRED `
8787 - ` to ` : An array of phone numbers. ` REQUIRED `
88- - ` keyword ` : Your premium product keyword ` REQUIRED `
88+ - ` from ` : Shortcode that is registered with your Africa's Talking account. ` REQUIRED `
89+ - ` keyword ` : Your premium product keyword
8990 - ` linkId ` : "[ ...] We forward the ` linkId ` to your application when a user sends a message to your onDemand service"
9091 - ` retryDurationInHours ` : "This specifies the number of hours your subscription message should be retried in case it's not delivered to the subscriber"
9192
Original file line number Diff line number Diff line change @@ -24,14 +24,16 @@ protected function doSend ($options, $isPremium)
2424 }
2525
2626 if ($ isPremium === true ) {
27- if (empty ($ options ['keyword ' ]) || empty ( $ options [ ' from ' ])) {
27+ if (empty ($ options ['from ' ])) {
2828 return [
2929 'status ' => 'error ' ,
30- 'data ' => 'sender, keyword and linkId are required for premium SMS '
30+ 'data ' => 'from is required for premium SMS '
3131 ];
3232 }
3333
34- $ data ['keyword ' ] = $ options ['keyword ' ];
34+ if (!empty ($ options ['keyword ' ])) {
35+ $ data ['keyword ' ] = $ options ['keyword ' ];
36+ }
3537
3638 if (!empty ($ options ['linkId ' ])) {
3739 $ data ['linkId ' ] = $ options ['linkId ' ];
You can’t perform that action at this time.
0 commit comments