/** * Test Case Reference 5.2 * * @return void * @since 3.9 */ public function test_doexpresscheckout_ref52() { // Fully Refunded Transaction $response = $this->gateway->get_transaction_details('29585298U7589982T'); $this->assertTrue($response->is_successful()); st_echo('Test Case 5.2:' . "\n"); st_echo('Transaction ID: 29585298U7589982T' . "\n"); st_echo('Payment Status: ' . $response->get_params()['PAYMENTSTATUS'] . "\n"); }
/** * Test Case Reference 6.1 * * @return void * @since 3.9 */ public function test_doexpresscheckout_ref61() { // Cancelled Transaction $response = $this->gateway->get_transaction_details('O-0CJ689879E5247331'); $this->assertTrue($response->is_successful()); st_echo('Test Case 6.1:' . "\n"); st_echo('Transaction ID: O-0CJ689879E5247331' . "\n"); st_echo('Payment Status: ' . $response->get_params()['PAYMENTSTATUS'] . "\n"); }
/** * Test Case Reference 4.2 * * @return void * @since 3.9 */ public function test_doexpresscheckout_ref42() { $this->purchase_options['complete_type'] = 'Complete'; $this->purchase_options['amount'] = 15.34; $this->purchase_options['authorization_id'] = 'O-79124340AV3470941'; $response = $this->gateway->capture($this->purchase_options); $this->assertTrue($response->is_successful()); // Display the Transaction Id st_echo('Test Case 4.2: ' . $response->get('transaction_id') . "\n"); }
/** * Test Case Reference 2.2 * * @return void * @since 3.9 */ public function test_doexpresscheckout_ref22() { // Using the Token and Payer Id for another transaction $transaction_id = '10001'; // Call DoExpressCheckout $response = $this->gateway->get_transaction_details($transaction_id); $this->assertFalse($response->is_successful()); // Display the Transaction Id st_echo('Test Case 2.2: ' . $response->get('correlation_id') . "\n"); }
/** * Test Case Reference A.6.2 * * Standard Fields Test * * @return void * @since 3.9 */ public function test_setexpresscheckout_standard_refA62() { // Call CreateButtom $options = is_array($this->purchase_options) ? $this->purchase_options : array(); // Set Billing information $options['billing_address'] = array('name' => 'Abid Omar', 'street' => '1 Infinite Loop', 'street2' => 'Apple Headquarter ext', 'city' => 'Cupertino', 'state' => 'CA', 'country' => 'US', 'zip' => '95014', 'phone' => '(877) 412-7753'); $response = $this->gateway->createButton($options); $this->assertTrue($response->is_successful()); // Display the correlation Id st_echo('Test Case A.6.2: ' . $response->get('correlation_id') . "\n"); }
/** * Test Case Reference A.1.3 * * @return void * @since 3.9 */ public function test_paypalpro_refA13() { // Negative Test $this->purchase_options['message_id'] = ''; $this->purchase_options['transaction_id'] = '1MC14541JJ0533214'; $this->purchase_options['invoice'] = '2'; $this->purchase_options['refund_type'] = 'partial'; $this->purchase_options['amount'] = '100.01'; $response = $this->gateway->credit($this->purchase_options); $this->assertFalse($response->is_successful()); st_echo('Test Case A1.3:' . "\n"); st_echo('Correlation ID: ' . $response->get_params()['CORRELATIONID'] . "\n"); }
/** * Test Case Reference 3.3 * * @return void * @since 3.9 */ public function test_doexpresscheckout_ref33() { // Negative Testing $this->purchase_options['subtotal'] = 100.01; $this->purchase_options['shipping'] = 0; $this->purchase_options['tax'] = 0; $this->purchase_options['amount'] = 100.01; $this->purchase_options['max_amount'] = 100.01; $this->purchase_options['items'] = array(); // Using the Token and Payer Id for another transaction $this->purchase_options['token'] = 'EC-3W674134AM197213K'; $this->purchase_options['payer_id'] = 'FQQ7Q9EVPAB86'; // Call DoExpressCheckout $response = $this->gateway->purchase($this->purchase_options); $this->assertFalse($response->is_successful()); // Display the Transaction Id st_echo('Test Case 3.3: ' . $response->get('correlation_id') . "\n"); }
/** * Test Case Reference 4.3 * * @return void * @since 3.9 */ public function test_doexpresscheckout_ref43() { $this->purchase_options['token'] = 'EC-8AU95879WD9646218'; $this->purchase_options['message_id'] = 'abcedfghkk'; $this->purchase_options['invoice'] = 'E84A90G555'; $this->purchase_options['transaction_id'] = '2WH811268W276704P'; $this->purchase_options['amount'] = 100.01; // Call DoRefund $response = $this->gateway->credit($this->purchase_options); $this->assertFalse($response->is_successful()); // Display the Transaction Id st_echo('Test Case 4.3: ' . $response->get('correlation_id') . "\n"); }
/** * Test Case Reference 1.09 * * @return void * @since 3.9 */ public function test_setexpresscheckout_standard_ref109() { // Negative Testing $this->purchase_options['subtotal'] = 100.01; $this->purchase_options['shipping'] = 0; $this->purchase_options['tax'] = 0; $this->purchase_options['amount'] = 100.01; $this->purchase_options['max_amount'] = 100.01; $this->purchase_options['items'] = array(); // Call SetExpressCheckout $response = $this->gateway->setup_purchase($this->purchase_options); $this->assertFalse($response->is_successful()); // Display the transaction Id $error = $response->get_error(); st_echo('Test Case 1.09: ' . $response->get('correlation_id') . ' - ' . $error['details'] . "\n"); }