Skip to content

Commit

Permalink
fromat: improve code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinderk committed Aug 19, 2023
1 parent 2932dd8 commit 85fbc87
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/PaymentGateways/Gateways/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public function boot()
} catch (Exception $e) {
Log::error('Error Registering Gateways', [
'message' => $e->getMessage()
]
);
]);
}

$this->enqueueGatewayScripts();
Expand Down Expand Up @@ -82,17 +81,17 @@ private function registerGateways()
});


add_filter("givewp_create_payment_gateway_data_" . PayPalCommerce::id(), function ($gatewayData) {
add_filter("givewp_create_payment_gateway_data_" . PayPalCommerceGateway::id(), function ($gatewayData) {
$gatewayData['payPalOrderId'] = $gatewayData['payPalOrderId'] ?? give_clean($_POST['payPalOrderId']);
return $gatewayData;
});

add_filter('give_recurring_modify_donation_data', function($recurringData) {
add_filter('give_recurring_modify_donation_data', function ($recurringData) {
/**
* PayPal Donations/Commerce (NextGen)
* Optionally account for the period, frequency, and times values being passed via post data.
*/
if(isset($_GET['action']) && 'give_paypal_commerce_create_plan_id' == $_GET['action']) {
if (isset($_GET['action']) && 'give_paypal_commerce_create_plan_id' == $_GET['action']) {
$recurringData['period'] = $recurringData['period'] ?: $recurringData['post_data']['period'];
$recurringData['frequency'] = $recurringData['frequency'] ?: $recurringData['post_data']['frequency'];
$recurringData['times'] = $recurringData['times'] ?: $recurringData['post_data']['times'];
Expand Down

0 comments on commit 85fbc87

Please sign in to comment.