public Purchase ( string merchantReference, Kurejito.Payments.Money amount, |
||
merchantReference | string | An alphanumeric reference supplied by the merchant that uniquely identifies this transaction |
amount | Kurejito.Payments.Money | The amount of money to be debited from the payment card (includes the ISO4217 currency code). |
card | An instance of |
|
return | PaymentResponse |
public void FakeBank_Declines_Payments_Over_Ten_Pounds() { var gw = new PaymentGateway(); var response = gw.Purchase("pay001", new Money(10.01m, new Currency("GBP")), new PaymentCard()); Assert.Equal(PaymentStatus.Declined, response.Status); }
public void FakeBank_Approves_Payments_Under_Ten_Pounds() { var gw = new PaymentGateway(); var response = gw.Purchase("pay001", new Money(9.99m, new Currency("GBP")), new PaymentCard()); Assert.Equal(PaymentStatus.Ok, response.Status); }