本文整理汇总了PHP中Payment::refund方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::refund方法的具体用法?PHP Payment::refund怎么用?PHP Payment::refund使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Payment
的用法示例。
在下文中一共展示了Payment::refund方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPaymentRefund
public function testPaymentRefund()
{
$this->mockResponse($this->success_payment_refund_response());
$token = 'pmt_4KQ2DD15gs2w8RS4M2MhBz1Q';
$payment = Payment::refund($token);
$this->assertTrue($payment->refunded);
$this->assertEquals('Refunded', $payment->status);
$this->assertEquals(0, $payment->fee_amount);
}
示例2: testPaymentError
/**
* @expectedException Everypay\Exception\CurlException
* @expectedExceptionMessage The returned response is not in json format
*/
public function testPaymentError()
{
if ($this->isRemote()) {
$this->markTestSkipped('Test not available in TEST_ENV REMOTE.');
}
$this->mockResponse($this->error_payment_response(), 'text/html');
$token = 'pmt_4KQ2DD15gs2w8RS4M2MhBz1Q';
$payment = Payment::refund($token);
}
示例3: testPaymentError
/**
* @expectedException Everypay\Exception\CurlException
* @expectedExceptionMessage The returned response is not in json format
*/
public function testPaymentError()
{
$this->mockResponse($this->error_payment_response(), 'text/html');
$token = 'pmt_4KQ2DD15gs2w8RS4M2MhBz1Q';
$payment = Payment::refund($token);
}