Merge commit '41575d24bb' into webgui8. Some tests still failing.
Conflicts: docs/gotcha.txt lib/WebGUI.pm lib/WebGUI/Asset.pm lib/WebGUI/Asset/File/GalleryFile/Photo.pm lib/WebGUI/Asset/Post.pm lib/WebGUI/Asset/Template.pm lib/WebGUI/Asset/WikiPage.pm lib/WebGUI/Asset/Wobject/WikiMaster.pm lib/WebGUI/Cache.pm lib/WebGUI/Content/Setup.pm lib/WebGUI/Role/Asset/Subscribable.pm lib/WebGUI/Shop/Cart.pm lib/WebGUI/Shop/Pay.pm lib/WebGUI/Shop/PayDriver/ITransact.pm sbin/testEnvironment.pl t/Asset/WikiPage.t t/Shop/PayDriver.t t/Shop/PayDriver/ITransact.t t/Shop/PayDriver/Ogone.t t/Shop/TaxDriver/EU.t t/Shop/TaxDriver/Generic.t t/Workflow/Activity/RemoveOldCarts.t t/lib/WebGUI/Test.pm
This commit is contained in:
commit
5febc0ebbc
258 changed files with 5528 additions and 2230 deletions
|
|
@ -23,6 +23,7 @@ use WebGUI::Session;
|
|||
use WebGUI::Shop::Cart;
|
||||
use WebGUI::Shop::Ship;
|
||||
use WebGUI::Shop::Transaction;
|
||||
use WebGUI::Shop::PayDriver::ITransact;
|
||||
use JSON;
|
||||
use HTML::Form;
|
||||
use WebGUI::Shop::PayDriver::ITransact;
|
||||
|
|
@ -30,6 +31,7 @@ use WebGUI::Shop::PayDriver::ITransact;
|
|||
#----------------------------------------------------------------------------
|
||||
# Init
|
||||
my $session = WebGUI::Test->session;
|
||||
$session->user({userId => 3});
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -41,6 +43,25 @@ plan tests => 28;
|
|||
# figure out if the test can actually run
|
||||
|
||||
my $e;
|
||||
my $ship = WebGUI::Shop::Ship->new($session);
|
||||
my $cart = WebGUI::Shop::Cart->newBySession($session);
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
my $shipper = $ship->getShipper('defaultfreeshipping000');
|
||||
my $address = $cart->getAddressBook->addAddress( {
|
||||
label => 'red',
|
||||
firstName => 'Ellis Boyd', lastName => 'Redding',
|
||||
address1 => 'cell block #5',
|
||||
city => 'Shawshank', state => 'MN',
|
||||
code => '55555', country => 'United States of America',
|
||||
phoneNumber => '555.555.5555', email => 'red@shawshank.gov',
|
||||
} );
|
||||
$cart->update({
|
||||
billingAddressId => $address->getId,
|
||||
shippingAddressId => $address->getId,
|
||||
shipperId => $shipper->getId,
|
||||
});
|
||||
my $transaction;
|
||||
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
|
||||
my $home = WebGUI::Asset->getDefault($session);
|
||||
|
|
@ -82,9 +103,6 @@ $cart->update({
|
|||
shipperId => $shipper->getId,
|
||||
});
|
||||
|
||||
|
||||
my $hammerItem = $rockHammer->addToCart($rockHammer->getCollateral('variantsJSON', 'variantId', $smallHammer));
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# definition
|
||||
|
|
@ -254,21 +272,8 @@ $driver->{_cardData} = {
|
|||
cvv2 => '1234',
|
||||
};
|
||||
|
||||
$driver->{_billingAddress} = {
|
||||
firstName => 'Ellis Boyd',
|
||||
lastName => 'Redding',
|
||||
address1 => '#2 Row 30265',
|
||||
city => 'Shawshank',
|
||||
state => 'Maine',
|
||||
code => '97025',
|
||||
country => 'USA',
|
||||
phoneNumber => '555.555.5555',
|
||||
email => '30265@shawshank.gov',
|
||||
};
|
||||
|
||||
|
||||
my $transaction = WebGUI::Shop::Transaction->create($session, {
|
||||
paymentMethod => $driver,
|
||||
$cart->update({gatewayId => $driver->getId,});
|
||||
$transaction = WebGUI::Shop::Transaction->create($session, {
|
||||
cart => $cart,
|
||||
isRecurring => $cart->requiresRecurringPayment,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue