File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Recurrence/Services/ResponseHandlers Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " pagarme/ecommerce-module-core" ,
3
3
"description" : " Core component for Pagar.me e-commerce platform modules." ,
4
4
"license" : " MIT" ,
5
- "version" : " 2.7.0 " ,
5
+ "version" : " 2.7.1 " ,
6
6
"authors" : [
7
7
{
8
8
"name" :" Open Source Team"
Original file line number Diff line number Diff line change @@ -171,7 +171,11 @@ private function getRequestMetaData($orderRequest)
171
171
$ metadata ->moduleVersion = $ versionService ->getModuleVersion ();
172
172
$ metadata ->coreVersion = $ versionService ->getCoreVersion ();
173
173
$ metadata ->platformVersion = $ versionService ->getPlatformVersion ();
174
- if ($ this ->hasCreditCardInPayments ($ orderRequest ->payments ) && !empty (MPSetup::getInstallmentType ())){
174
+ if (
175
+ property_exists ($ orderRequest , "payments " ) &&
176
+ $ this ->hasCreditCardInPayments ($ orderRequest ->payments ) &&
177
+ !empty (MPSetup::getInstallmentType ())
178
+ ) {
175
179
$ metadata ->interestType = MPSetup::getInstallmentType ();
176
180
}
177
181
return $ metadata ;
@@ -180,7 +184,7 @@ private function getRequestMetaData($orderRequest)
180
184
private function hasCreditCardInPayments ($ payments )
181
185
{
182
186
foreach ($ payments as $ payment ) {
183
- if ($ payment ->paymentMethod === TransactionType::CREDIT_CARD ) {
187
+ if ($ payment ->paymentMethod === TransactionType::CREDIT_CARD ) {
184
188
return true ;
185
189
}
186
190
}
@@ -291,7 +295,7 @@ public function createSubscription(Subscription $subscription)
291
295
$ endpoint = $ this ->getAPIBaseEndpoint ();
292
296
293
297
$ subscription ->addMetaData (
294
- json_decode (json_encode ($ this ->getRequestMetaData ()), true )
298
+ json_decode (json_encode ($ this ->getRequestMetaData ($ subscription )), true )
295
299
);
296
300
297
301
$ subscriptionRequest = $ subscription ->convertToSDKRequest ();
Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ private function handleSubscriptionStatusPaid(Subscription $subscription)
87
87
return $ cantCreateReason ;
88
88
}
89
89
90
+ private function handleSubscriptionStatusProcessing (Subscription $ subscription )
91
+ {
92
+ return $ this ->handleSubscriptionStatusPaid ($ subscription );
93
+ }
94
+
90
95
private function handleSubscriptionStatusPending (Subscription $ subscription )
91
96
{
92
97
$ order = $ this ->order ;
You can’t perform that action at this time.
0 commit comments