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 22 "name" : " pagarme/ecommerce-module-core" ,
33 "description" : " Core component for Pagar.me e-commerce platform modules." ,
44 "license" : " MIT" ,
5- "version" : " 2.7.0 " ,
5+ "version" : " 2.7.1 " ,
66 "authors" : [
77 {
88 "name" :" Open Source Team"
Original file line number Diff line number Diff line change @@ -171,7 +171,11 @@ private function getRequestMetaData($orderRequest)
171171 $ metadata ->moduleVersion = $ versionService ->getModuleVersion ();
172172 $ metadata ->coreVersion = $ versionService ->getCoreVersion ();
173173 $ 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+ ) {
175179 $ metadata ->interestType = MPSetup::getInstallmentType ();
176180 }
177181 return $ metadata ;
@@ -180,7 +184,7 @@ private function getRequestMetaData($orderRequest)
180184 private function hasCreditCardInPayments ($ payments )
181185 {
182186 foreach ($ payments as $ payment ) {
183- if ($ payment ->paymentMethod === TransactionType::CREDIT_CARD ) {
187+ if ($ payment ->paymentMethod === TransactionType::CREDIT_CARD ) {
184188 return true ;
185189 }
186190 }
@@ -291,7 +295,7 @@ public function createSubscription(Subscription $subscription)
291295 $ endpoint = $ this ->getAPIBaseEndpoint ();
292296
293297 $ subscription ->addMetaData (
294- json_decode (json_encode ($ this ->getRequestMetaData ()), true )
298+ json_decode (json_encode ($ this ->getRequestMetaData ($ subscription )), true )
295299 );
296300
297301 $ subscriptionRequest = $ subscription ->convertToSDKRequest ();
Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ private function handleSubscriptionStatusPaid(Subscription $subscription)
8787 return $ cantCreateReason ;
8888 }
8989
90+ private function handleSubscriptionStatusProcessing (Subscription $ subscription )
91+ {
92+ return $ this ->handleSubscriptionStatusPaid ($ subscription );
93+ }
94+
9095 private function handleSubscriptionStatusPending (Subscription $ subscription )
9196 {
9297 $ order = $ this ->order ;
You can’t perform that action at this time.
0 commit comments