Code Duplication    Length = 6-6 lines in 2 locations

class/class-edu-sveawebpay.php 2 locations

@@ 235-240 (lines=6) @@
232
233
			$currency = EDU()->get_option( 'eduadmin-currency', 'SEK' );
234
235
			if ( 'no' !== $this->get_option( 'testrun', 'no' ) ) {
236
				$wpConfig = new EduSveaWebPayTestConfig( $this );
237
			} else {
238
				$wpConfig = new EduSveaWebPayProductionConfig( $this );
239
			}
240
241
			$wpOrder = WebPay::checkout( $wpConfig );
242
243
			$orderRow = WebPayItem::orderRow();
@@ 358-363 (lines=6) @@
355
		}
356
357
		private function update_booking( $ecl_id, $booking_id, $programme_booking_id ) {
358
			if ( 'no' !== $this->get_option( 'testrun', 'no' ) ) {
359
				$wpConfig = new EduSveaWebPayTestConfig( $this );
360
			} else {
361
				$wpConfig = new EduSveaWebPayProductionConfig( $this );
362
			}
363
364
			$wpOrder = WebPay::checkout( $wpConfig );
365
			$wpOrder->setCheckoutOrderId( $ecl_id );
366