/** * Returns html text (<p> paragraphs) on current status and next steps of payment, depending on payment basket status * * @param cbpaidPaymentBasket $paymentBasket Payment basket being paid * @return string */ public function getTxtNextStep( $paymentBasket ) { switch ( $paymentBasket->payment_status ) { case 'Completed': $newMsg = CBPTXT::Th("Your transaction has been completed, and a receipt for your purchase has been emailed to you by PayPal.") . ' ' . CBPTXT::Th("You may log into your account at www.paypal.com to view status details of this transaction."); break; case 'Pending': $newMsg = CBPTXT::Th("Your payment is currently being processed.") . ' ' . CBPTXT::Th("A receipt for your purchase will be emailed to you by PayPal once processing is complete.") . ' ' . CBPTXT::Th("You may log into your account at www.paypal.com to view status details of this transaction."); break; case 'RegistrationCancelled': $newMsg = parent::getTxtNextStep( $paymentBasket ); break; case 'FreeTrial': // if ( $paymentBasket->period1 && ( $paymentBasket->amount3 != 0 ) ) { // $newMsg = CBPTXT::Th("Your next payment will be done automatically."); // main interface will output: 'Thank you for subscribing to .' before this // } $newMsg = ''; break; case 'Processed': case 'Denied': case 'Reversed': case 'Refunded': case 'Partially-Refunded': default: $newMsg = CBPTXT::Th("Your transaction is not cleared and has currently following status:") . ' <strong>' . CBPTXT::Th( htmlspecialchars( $paymentBasket->payment_status ) ) . '.</strong>' . ' ' . CBPTXT::Th("You may log into your account at www.paypal.com to view status details of this transaction."); break; } return $newMsg; }